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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
xor edi, edi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], edi
test dword [esi + 8], 0x80000
je 0x4037d7
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x24]
ja 0x4037d7
xor edx, edx
inc edx
jmp 0x4037d9
mov edx, edi
cmp dword [esi], edi
jne 0x4037f8
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov eax, dword [eax]
sub eax, ecx
cmp eax, 0x14ccc
jb 0x4037f8
mov eax, dword [esi + 0x74]
add eax, ecx
jmp 0x4037fe
lea eax, [esi + 0x39272]
mov cl, byte [esi + 0x38]
mov dword [esi + 0x30], eax
mov dword [ebp - 8], eax
add eax, 0x14cbc
mov dword [esi + 0x34], eax
mov eax, dword [esi + 0x2c]
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], edi
push 8
shr byte [eax], cl
xor eax, eax
pop edi
cmp dword [esi + 0x38], edi
sete al
sub dword [esi + 0x28], eax
test dword [esi + 8], 0x1000
je 0x40389b
cmp dword [esi + 0x64], 0
jne 0x40389b
mov ecx, dword [esi + 0x44]
push 0x78
pop eax
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 8]
mov dword [esi + 0x44], eax
cmp eax, edi
jb 0x403869
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40385c
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], edi
jae 0x40384c
mov ecx, dword [esi + 0x44]
xor eax, eax
inc eax
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 8]
mov dword [esi + 0x44], eax
cmp eax, edi
jb 0x40389b
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40388e
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], edi
jae 0x40387e
mov ecx, dword [esi + 0x44]
xor eax, eax
cmp ebx, 4
sete al
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 1]
mov dword [esi + 0x44], eax
cmp eax, edi
jb 0x4038d2
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x4038c5
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], edi
jae 0x4038b5
mov eax, dword [esi + 0x48]
mov edi, dword [esi + 0x30]
mov ebx, dword [esi + 0x44]
mov dword [ebp - 4], eax
test edx, edx
jne 0x4039cb
test dword [esi + 8], 0x40000
jne 0x4038f5
cmp dword [esi + 0x3c], 0x30
jae 0x4038f8
xor edx, edx
inc edx
mov ecx, esi
call fcn.0040378e
cmp dword [esi + 0x3c], 0
mov edx, eax
je 0x403916
mov ecx, dword [esi + 0x30]
sub ecx, edi
inc ecx
cmp ecx, dword [esi + 0x3c]
jae 0x4039ce
test edx, edx
jne 0x40392e
mov ecx, dword [ebp - 4]
inc edx
mov dword [esi + 0x48], ecx
mov ecx, esi
mov dword [esi + 0x30], edi
mov dword [esi + 0x44], ebx
call fcn.0040378e
push 2
pop ebx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x403b7d
mov ecx, dword [esi + 0x44]
push 4
pop edi
cmp eax, edi
jne 0x403adb
test ecx, ecx
je 0x40397a
xor eax, eax
mov dword [esi + 0x44], 8
shl eax, cl
or dword [esi + 0x48], eax
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x40396c
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], 8
jae 0x40395c
test dword [esi + 8], 0x1000
je 0x403b7d
mov edx, dword [esi + 0x18]
mov ecx, dword [esi + 0x44]
mov eax, edx
shr eax, 0x18
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 8]
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x4039c0
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x4039b2
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], 8
jae 0x4039a2
shl edx, 8
dec edi
jne 0x40398a
jmp 0x403b7d
mov edx, dword [ebp - 0xc]
mov eax, dword [esi + 0x1c]
sub eax, dword [esi + 0x40]
cmp eax, dword [esi + 0x24]
ja 0x403916
xor eax, eax
mov dword [esi + 0x30], edi
mov ecx, ebx
shl eax, cl
or eax, dword [ebp - 4]
push 8
mov dword [esi + 0x48], eax
lea eax, [ebx + 2]
pop edi
mov dword [esi + 0x44], eax
cmp eax, edi
jb 0x403a16
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x403a09
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], edi
jae 0x4039f9
mov ecx, dword [esi + 0x44]
test ecx, ecx
je 0x403a44
xor eax, eax
mov dword [esi + 0x44], edi
shl eax, cl
or dword [esi + 0x48], eax
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x403a37
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], edi
jae 0x403a27
push 2
pop ebx
mov edx, ebx
mov ecx, dword [esi + 0x44]
movzx eax, word [esi + 0x3c]
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 0x10]
mov dword [esi + 0x44], eax
cmp eax, edi
jb 0x403a7c
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x403a6f
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], edi
jae 0x403a5f
xor dword [esi + 0x3c], 0xffff
dec edx
jne 0x403a49
cmp dword [esi + 0x3c], edx
jbe 0x403931
mov eax, dword [esi + 0x40]
mov ecx, dword [esi + 0x44]
add eax, edx
and eax, 0x7fff
movzx eax, byte [eax + esi + 0x90]
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 8]
mov dword [esi + 0x44], eax
cmp eax, edi
jb 0x403ad0
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x403ac3
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], edi
jae 0x403ab3
inc edx
cmp edx, dword [esi + 0x3c]
jb 0x403a8f
jmp 0x403931
xor eax, eax
xor edx, edx
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 3]
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x403b0d
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x403aff
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], 8
jae 0x403aef
mov ecx, dword [esi + 0x44]
test ecx, ecx
je 0x403b40
xor eax, eax
mov dword [esi + 0x44], 8
shl eax, cl
or dword [esi + 0x48], eax
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x403b32
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], 8
jae 0x403b22
mov ecx, dword [esi + 0x44]
movzx eax, dx
shl eax, cl
or dword [esi + 0x48], eax
lea eax, [ecx + 0x10]
mov dword [esi + 0x44], eax
cmp eax, 8
jb 0x403b74
mov ecx, dword [esi + 0x30]
cmp ecx, dword [esi + 0x34]
jae 0x403b66
mov al, byte [esi + 0x48]
mov byte [ecx], al
inc dword [esi + 0x30]
shr dword [esi + 0x48], 8
add dword [esi + 0x44], 0xfffffff8
cmp dword [esi + 0x44], 8
jae 0x403b56
xor edx, 0xffff
dec ebx
jne 0x403b40
push 0x240
xor ebx, ebx
lea eax, [esi + 0x8192]
push ebx
push eax
call dword [0x41265c]
push 0x40
lea eax, [esi + 0x83d2]
push ebx
push eax
call dword [0x41265c]
lea eax, [esi + 0x9273]
mov dword [esi + 0x38], 8
mov dword [esi + 0x28], eax
add esp, 0x18
lea eax, [esi + 0x9272]
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x3c]
add dword [esi + 0x40], eax
inc dword [esi + 0x64]
mov eax, dword [ebp - 8]
mov dword [esi + 0x3c], ebx
mov ebx, dword [esi + 0x30]
sub ebx, eax
je 0x403c48
cmp dword [esi], 0
je 0x403c03
mov eax, dword [esi + 0x78]
mov ecx, dword [esi + 0x84]
sub ecx, dword [esi + 0x70]
mov dword [eax], ecx
lea eax, [esi + 0x39272]
push dword [esi + 4]
push ebx
push eax
call dword [esi]
add esp, 0xc
test eax, eax
jne 0x403c48
or eax, 0xffffffff
mov dword [esi + 0x6c], eax
jmp 0x403c4b
lea edx, [esi + 0x39272]
cmp eax, edx
jne 0x403c42
mov eax, dword [esi + 0x7c]
mov ecx, dword [esi + 0x8c]
mov edi, dword [eax]
mov eax, dword [esi + 0x74]
sub edi, ecx
cmp ebx, edi
cmovb edi, ebx
add eax, ecx
push edi
push edx
push eax
call dword [0x4122b8]
add dword [esi + 0x8c], edi
add esp, 0xc
sub ebx, edi
je 0x403c48
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], ebx
jmp 0x403c48
add dword [esi + 0x8c], ebx
mov eax, dword [esi + 0x5c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret