Function at 0x39c4f50
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x58
push ebx
push ebp
xor eax, eax
push esi
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x6c]
push edi
push eax
call dword [0x3a5fdb8]
mov edi, eax
mov ebp, dword [edi + 0x50]
mov esi, dword [edi + 0x54]
lea ebx, [ebp + 0xfff]
add ebp, 0xffff
add esi, 0xfff
and ebx, 0xfffff000
and ebp, 0xffff0000
and esi, 0xfffff000
cmp word [edi + 0x5c], 1
jne 0x39c5055
cmp dword [edi + 0x38], 0x1000
jae 0x39c5055
mov edx, dword [esp + 0x7c]
mov esi, dword [esp + 0x74]
lea ecx, [esp + 0x1c]
push ecx
push edx
push 0x40
mov dword [esp + 0x20], esi
mov dword [esp + 0x1c], ebx
call fcn.039c2c80
mov edx, dword [esp + 0x78]
add esp, 8
push eax
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x20]
push ecx
push edx
call dword [0x3a5ff8c]
cmp ebx, ebp
jae 0x39c5036
push 0x4000
lea ecx, [esp + 0x14]
lea eax, [ebx + esi]
push ecx
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x74]
push edx
sub ebp, ebx
push eax
mov dword [esp + 0x20], ebp
call dword [0x3a5fe5c]
test eax, eax
jge 0x39c5036
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], 1
call fcn.039f3050
mov edx, dword [esp + 0x6c]
push 1
add edi, 0xc8
push edi
push esi
push edx
call fcn.039c2cd0
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret
test byte [esp + 0x78], 2
movzx eax, word [edi + 0x14]
mov ebp, dword [esp + 0x74]
lea ecx, [eax + edi + 0x18]
mov dword [esp + 0x18], ecx
jne 0x39c50e3
mov ecx, dword [esp + 0x7c]
lea eax, [esp + 0x1c]
push eax
push ecx
mov dword [esp + 0x1c], ebp
mov edx, dword [edi + 0x54]
push 2
mov dword [esp + 0x1c], edx
call fcn.039c2c80
mov ebx, dword [esp + 0x78]
add esp, 8
push eax
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x20]
push eax
push ebx
call dword [0x3a5ff8c]
cmp byte [esp + 0x88], 0
je 0x39c50e7
test eax, eax
jl 0x39c50e7
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x8c]
lea ecx, [eax + ebp]
sub edx, eax
lea eax, [esp + 0x1c]
push eax
push 0x80
mov dword [esp + 0x1c], ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], edx
push ecx
lea edx, [esp + 0x20]
push edx
push ebx
call fcn.039cfca0
jmp 0x39c50e7
mov ebx, dword [esp + 0x6c]
push 1
lea eax, [edi + 0xc8]
push eax
push ebp
push ebx
call fcn.039c2cd0
add esp, 0x10
cmp word [edi + 6], 0
je 0x39c5159
mov eax, dword [esp + 0x18]
cmp esi, dword [eax + 0xc]
jae 0x39c5159
lea ecx, [esi + ebp]
mov dword [esp + 0x14], ecx
mov edx, dword [eax + 0xc]
push 0x4000
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
push ecx
sub edx, esi
push ebx
mov dword [esp + 0x20], edx
call dword [0x3a5fe5c]
test eax, eax
jge 0x39c5159
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x80]
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], 1
call fcn.039f3050
xor ecx, ecx
xor esi, esi
cmp cx, word [edi + 6]
jae 0x39c5353
jmp 0x39c5174
mov ebp, dword [esp + 0x74]
mov eax, dword [esp + 0x18]
lea edx, [esi + esi*4]
mov ecx, dword [eax + edx*8 + 0xc]
lea ebx, [eax + edx*8]
cmp ecx, dword [esp + 0x84]
jae 0x39c5353
mov edx, dword [ebx + 0x24]
add ebx, 0x24
push edx
call fcn.039c2ba0
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x1c]
push esi
push eax
add ecx, ebp
push edi
mov dword [esp + 0x24], ecx
call fcn.039c2c20
mov ebp, eax
mov dword [esp + 0x20], ebp
movzx ecx, word [edi + 6]
lea eax, [esi + 1]
add esp, 0x10
cmp eax, ecx
mov edx, esi
mov dword [esp + 0x24], edx
jge 0x39c5248
mov dword [esp + 0x20], eax
jmp 0x39c51d5
mov edx, dword [esp + 0x24]
mov ecx, dword [ebx + 0x28]
push ecx
call fcn.039c2ba0
add esp, 4
cmp eax, dword [esp + 0x28]
jne 0x39c5248
mov eax, dword [ebx]
xor ecx, eax
mov dword [esp + 0x2c], eax
test ecx, 0x10000000
jne 0x39c5248
test eax, 0x2000000
je 0x39c5202
test al, 0x40
je 0x39c5248
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 0x10]
lea edx, [edx + edx*4]
mov edx, dword [ecx + edx*8 + 0xc]
add edx, ebp
cmp edx, eax
jne 0x39c5244
cmp eax, dword [esp + 0x84]
jae 0x39c5244
inc dword [esp + 0x20]
inc esi
push esi
mov eax, ecx
push eax
push edi
add ebx, 0x28
call fcn.039c2c20
add ebp, eax
mov dword [esp + 0x1c], ebp
movzx ecx, word [edi + 6]
add esp, 0xc
cmp dword [esp + 0x20], ecx
jl 0x39c51d1
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x84]
lea edx, [edx + edx*4]
lea ebx, [eax + edx*8 + 0xc]
mov eax, dword [ebx]
lea edx, [eax + ebp]
cmp edx, ecx
jbe 0x39c526b
mov ebp, ecx
sub ebp, eax
mov dword [esp + 0x10], ebp
mov ecx, dword [esp + 0x18]
lea eax, [esi + esi*4]
test dword [ecx + eax*8 + 0x24], 0x10000000
lea eax, [ecx + eax*8]
je 0x39c529a
mov edx, dword [ebx]
mov dword [esp + 0x34], edx
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], 0
lea eax, [esp + 0x34]
jmp 0x39c5339
movzx edx, word [edi + 6]
lea ecx, [esi + 1]
cmp ecx, edx
jne 0x39c52aa
mov eax, dword [edi + 0x50]
jmp 0x39c52ad
mov eax, dword [eax + 0x34]
mov ecx, dword [ebx]
add ebp, 0xfff
and ebp, 0xfffff000
add ecx, ebp
cmp ecx, eax
jae 0x39c5346
mov edx, dword [esp + 0x74]
add ecx, edx
mov dword [esp + 0x14], ecx
sub eax, dword [ebx]
lea edx, [esp + 0x4c]
sub eax, ebp
mov dword [esp + 0x2c], eax
mov dword [esp + 0x10], eax
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x70]
push 0x1c
push edx
push 0
push ecx
push eax
call dword [0x3a5fe60]
cmp dword [esp + 0x5c], 0x10000
je 0x39c5346
mov eax, dword [esp + 0x6c]
push 0x4000
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x1c]
push edx
push eax
call dword [0x3a5fe5c]
test eax, eax
jge 0x39c5346
mov ecx, dword [ebx]
mov edx, dword [esp + 0x2c]
add ecx, ebp
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], 1
lea eax, [esp + 0x40]
mov ecx, dword [esp + 0x80]
push eax
call fcn.039f3050
movzx ecx, word [edi + 6]
inc esi
cmp esi, ecx
jl 0x39c5170
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x58
ret