Function at 0x1004d786
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x1004d79f
mov eax, 1
jmp 0x1004da05
mov ecx, dword fs:[0x30]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + ecx + 8]
mov dword [ebp - 0x1c], eax
jmp 0x1004d7e5
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + edx]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
cmp dword [edx + 0x18], 0
je 0x1004d877
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0xc], ecx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x3c]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
add edx, 0x78
mov dword [ebp - 0x40], edx
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 0x40]
mov eax, dword [edx + ecx]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x1004d82f
jmp 0x1004d7d4
mov ecx, dword [ebp - 0xc]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0xc]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx]
or edx, 0x20202020
cmp edx, 0x6c64746e
je 0x1004d85c
jmp 0x1004d7d4
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 4]
or ecx, 0x20202020
cmp ecx, 0x6c642e6c
jne 0x1004d872
jmp 0x1004d877
jmp 0x1004d7d4
cmp dword [ebp - 0x10], 0
jne 0x1004d884
xor eax, eax
jmp 0x1004da05
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x18]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x1c]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x20]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x24]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x14], 0
mov ecx, dword [ebp + 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + edx*4 - 4]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
movzx eax, word [edx]
cmp eax, 0x775a
jne 0x1004d91f
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.1004da0c
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov dword [ecx + edx*8], eax
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x48]
movzx ecx, word [eax + edx*2 - 2]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 0x4c]
mov ecx, dword [esi + ecx*4]
mov dword [eax + edx*8 + 4], ecx
mov edx, dword [ebp - 0x14]
add edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 0x1000
jne 0x1004d91f
jmp 0x1004d939
cmp dword [ebp - 0x14], 0x1000
jne 0x1004d92a
jmp 0x1004d939
mov eax, dword [ebp - 0x18]
sub eax, 1
mov dword [ebp - 0x18], eax
jne 0x1004d8c1
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
mov dword [ecx], edx
mov dword [ebp - 0x20], 0
jmp 0x1004d953
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
sub edx, 1
cmp dword [ebp - 0x20], edx
jae 0x1004da00
mov dword [ebp - 4], 0
jmp 0x1004d976
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
sub edx, dword [ebp - 0x20]
sub edx, 1
cmp dword [ebp - 4], edx
jae 0x1004d9fb
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + eax*8 + 4]
cmp eax, dword [esi + edx*8 + 0xc]
jbe 0x1004d9f6
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*8]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [edx + ecx*8 + 4]
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [esi + eax*8 + 8]
mov dword [edx + ecx*8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov esi, dword [ebp - 8]
mov eax, dword [esi + eax*8 + 0xc]
mov dword [edx + ecx*8 + 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x54]
mov dword [edx + ecx*8 + 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x50]
mov dword [edx + ecx*8 + 0xc], eax
jmp 0x1004d96d
jmp 0x1004d94a
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret 4