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

Disassembly:
sub esp, 0x4c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x5c]
push edi
movsx eax, word [esi + 0x80]
movsx ecx, byte [esi + 0x8c]
mov dword [esp + 0x38], eax
mov eax, dword [esi + 0x1b8]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x3c], ecx
movsx eax, word [eax + 0x82]
lea edi, [esi + 0x120]
lea ebp, [esi + 0x210]
lea ecx, [eax + eax*4]
push edi
lea ebx, [esi + 0x298]
lea edx, [ecx + ecx*8]
lea eax, [eax + edx*4]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov dword [esp + 0x2c], eax
lea eax, [esi + 0x90]
mov dword [esp + 0x4c], eax
call fcn.0043d0e0
push edi
call fcn.0043d280
xor eax, eax
mov cl, byte [esi + 0x37c]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], eax
lea eax, [esi + 0x2fc]
add esp, 8
mov dword [esp + 0x10], eax
lea eax, [esi + 0x270]
mov dword [esp + 0x34], eax
lea eax, [esi + 0x250]
mov dword [esp + 0x18], eax
lea eax, [esi + 0x270]
sub eax, ebp
mov byte [esi + 0x37d], cl
mov dword [esp + 0x44], eax
mov eax, 0xfffffffe
mov dword [esp + 0x20], ebx
lea edx, [esi + 0x40]
lea ebx, [ebp + 2]
lea ecx, [esi + 0x2dc]
sub eax, ebp
lea edi, [esi + 0xf4]
mov dword [esp + 0x60], edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x40], eax
jmp 0x4038a9
mov eax, dword [esp + 0x40]
lea ebp, [edi - 4]
mov edx, ebp
push ebp
mov ecx, dword [edx]
mov dword [esp + 0x54], ecx
mov ecx, dword [edx + 4]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x64]
mov edx, dword [edx + 8]
mov dword [esp + 0x5c], edx
mov dx, word [esp + 0x3c]
mov word [ecx], dx
mov dl, byte [esp + 0x40]
mov byte [ecx + 0xc], dl
mov edx, dword [esp + 0x20]
lea ecx, [eax + ebx]
mov ebx, dword [esi + 0x1b8]
mov eax, dword [edx]
mov cx, word [ecx + ebx + 0x42]
mov ebx, dword [esp + 0x34]
cdq
and edx, 0xff
add eax, edx
mov edx, dword [esp + 0x2c]
sar eax, 8
sub cx, ax
lea eax, [ebx - 2]
sub ecx, edx
push eax
mov word [ebx], cx
mov dword [esp + 0x38], eax
call fcn.0042f310
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x38]
mov dx, word [esp + 0x30]
push eax
add word [ebx], dx
push ecx
call fcn.0042f310
mov ecx, dword [ebp]
push ebp
shl ecx, 8
mov dword [ebp], ecx
mov eax, dword [edi]
shl eax, 8
mov dword [edi], eax
mov edx, dword [edi + 4]
shl edx, 8
mov dword [edi + 4], edx
mov edx, dword [esp + 0x74]
push edx
call fcn.00443710
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x78]
lea eax, [esp + 0x44]
push eax
push ecx
push ebp
push edx
call fcn.00444ae0
mov eax, dword [edi]
mov edx, dword [esp + 0x54]
mov ecx, dword [0x466250]
sub eax, edx
mov edx, dword [esp + 0x78]
add eax, ecx
mov ecx, dword [esp + 0x38]
add esp, 0x28
mov dword [ecx], eax
mov eax, dword [ebp]
sub eax, edx
mov ebp, dword [esp + 0x34]
cdq
and edx, 0xff
add eax, edx
mov edx, dword [esp + 0x54]
sar eax, 8
mov word [ebp], ax
mov eax, dword [edi]
sub eax, edx
cdq
and edx, 0xff
add eax, edx
mov edx, dword [esp + 0x44]
sar eax, 8
mov word [edx + ebx], ax
mov eax, dword [edi + 4]
sub eax, dword [esp + 0x58]
cdq
and edx, 0xff
add eax, edx
sar eax, 8
mov word [ebp + 4], ax
mov eax, dword [ecx]
cdq
xor eax, edx
sub eax, edx
cmp eax, 0x200
jge 0x4039e0
mov dword [ecx], 0
cmp dword [ecx], 0x800
jle 0x403a09
mov ecx, dword [esp + 0x14]
mov eax, 1
shl eax, cl
mov ecx, dword [esp + 0x24]
or ecx, eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx], 0x2ee0
jmp 0x403a0f
mov edx, dword [esp + 0x2c]
mov dword [edi], edx
mov edx, dword [esp + 0x60]
mov eax, dword [esp + 0x14]
add edx, 0x10
add ebp, 8
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0x18]
add edx, 8
mov dword [esp + 0x34], ebp
mov ebp, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
mov edx, 4
inc eax
add ecx, edx
add ebx, 8
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x20]
add ebp, edx
add ecx, 0xc
add edi, 0xc
cmp eax, edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ecx
jl 0x4038a5
mov al, byte [esp + 0x24]
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
mov byte [esi + 0x37c], al
mov dword [esp + 0x60], edx
mov cx, word [esp + 0x38]
mov dl, byte [esp + 0x3c]
push edi
mov word [esi], cx
push ebx
mov byte [esi + 0xc], dl
call fcn.0042f310
mov ebp, dword [edi]
push edi
shl ebp, 8
mov dword [edi], ebp
mov edx, dword [edi + 4]
lea ebp, [edi + 4]
push esi
shl edx, 8
mov dword [ebp], edx
mov ecx, dword [ebp + 4]
shl ecx, 8
mov dword [ebp + 4], ecx
call fcn.00443710
push ebp
push edi
push esi
call fcn.00444770
mov eax, dword [esp + 0x7c]
add esp, 0x1c
add ebx, 8
add edi, 0xc
add esi, 0x10
dec eax
mov dword [esp + 0x60], eax
jne 0x403a7d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret