Function at 0x51df44d9
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 0x10]
test eax, eax
jne 0x51e2f93e
push ebx
push esi
movzx esi, word [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
push 0x3e6
push esi
push edi
call dword [0x51e85094]
test eax, eax
je 0x51e2f946
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x51df462c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov ax, word [esi + 4]
xor ecx, ecx
xor edi, edi
inc ecx
cmp ax, cx
mov dword [ebp - 8], esi
mov dword [ebp + 8], edi
je 0x51e2f9ce
cmp ax, 2
movzx eax, word [esi]
jne 0x51e2fa06
add eax, 7
cdq
push 8
pop ebx
idiv ebx
mov dword [ebp - 4], ecx
mov ebx, eax
movzx eax, word [esi + 2]
add ebx, 3
and ebx, 0xfffffffc
imul ebx, eax
add ebx, 0x30
mov eax, dword [ebp + 0x10]
xor ecx, ecx
cmp eax, ecx
jne 0x51e2fa2a
push 2
push ebx
lea eax, [ebp + 0xc]
push eax
call fcn.51df4664
test eax, eax
je 0x51df462c
xor ecx, ecx
cmp dword [ebp + 0x10], ecx
mov eax, dword [ebp + 0xc]
mov dword [eax], 0x28
movzx eax, word [esi]
mov edx, dword [ebp + 0xc]
mov dword [edx + 4], eax
movzx eax, word [esi + 2]
mov edx, dword [ebp + 0xc]
mov dword [edx + 8], eax
mov eax, dword [ebp + 0xc]
mov word [eax + 0xc], 1
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov word [edx + 0xe], ax
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x10], ecx
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x14], ebx
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x1c], ecx
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x20], edi
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x24], ecx
jne 0x51e2fa32
cmp edi, ecx
jne 0x51e2fa40
cmp ax, 1
jne 0x51e2fa7a
mov ecx, dword [ebp + 0xc]
mov eax, dword [0x51df4630]
mov dword [ecx + 0x28], eax
mov eax, dword [0x51df4634]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x2c], eax
mov eax, dword [ebp + 0xc]
add ebx, 0xffffffd0
push ebx
add eax, 0x30
push eax
add esi, 6
push esi
call fcn.51df4935
mov eax, dword [ebp + 0xc]
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret 0x10
xor eax, eax
jmp 0x51df4625
and dword [eax], 0
jmp 0x51df44e9
push 2
push esi
push edi
call dword [0x51e85094]
test eax, eax
je 0x51df462c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x51df462c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
push esi
call fcn.51e6d006
mov edi, dword [ebp + 0x10]
test edi, edi
pop ecx
mov ebx, eax
je 0x51e2f999
cmp dword [ebp + 0x14], ebx
mov dword [ebp + 8], edi
jae 0x51e2f9ad
mov eax, dword [ebp + 0x10]
push 0xa
pop ecx
rep movsd dword es:[edi], dword [esi]
mov dword [eax + 0x14], ebx
jmp 0x51df462c
push 2
push ebx
lea eax, [ebp + 8]
push eax
call fcn.51df4664
test eax, eax
je 0x51df462c
mov edi, dword [ebp + 8]
mov ecx, ebx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], ebx
mov eax, dword [ebp + 8]
jmp 0x51df4625
movzx eax, byte [esi + 6]
test eax, eax
mov dword [ebp + 8], eax
jne 0x51e2f9e3
mov dword [ebp + 8], pe_nt_image_headers32
mov eax, dword [ebp + 8]
movzx ecx, word [esi]
movzx edx, word [esi + 2]
mov edi, dword [ebp + 8]
add ecx, 3
and ecx, 0xfffffffc
imul ecx, edx
lea ebx, [ecx + eax*4 + 0x28]
mov dword [ebp - 4], 8
jmp 0x51df4564
inc eax
cdq
sub eax, edx
mov ebx, eax
movzx eax, word [esi + 2]
sar ebx, 1
add ebx, 3
and ebx, 0xfffffffc
imul ebx, eax
add ebx, 0x68
mov dword [ebp - 4], 4
jmp 0x51df4564
mov dword [ebp + 0xc], eax
jmp 0x51df4587
cmp dword [ebp + 0x14], ebx
jae 0x51df45e3
jmp 0x51df462c
mov eax, edi
mov edi, dword [ebp + 0xc]
shl eax, 2
mov ecx, eax
mov edx, ecx
shr ecx, 2
add esi, 7
add edi, 0x28
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea ecx, [ecx*4 + 0x28]
sub ebx, ecx
add ecx, edx
push ebx
push ecx
mov ecx, dword [ebp - 8]
lea eax, [eax + ecx + 7]
jmp 0x51e2fa9b
mov edi, dword [ebp + 0xc]
push 0x10
pop ecx
add edi, 0x28
mov esi, 0x51e2faa8
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp + 0xc]
add ebx, 0xffffff98
add eax, 0x68
push ebx
push eax
mov eax, dword [ebp - 8]
add eax, 6
push eax
jmp 0x51df461a