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

Disassembly:
sub esp, 0x60
push ebx
push ebp
push esi
mov esi, dword [esp + 0x70]
push edi
xor edx, edx
mov eax, dword [esi + 0x18]
mov edi, 1
cmp eax, edx
mov dword [esp + 0x74], edi
mov dword [esp + 0x10], edx
mov dword [esp + 0x2c], edx
je 0x401767
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x10]
cmp eax, ecx
je 0x401767
jge 0x4013ed
mov dword [esp + 0x74], edx
cmp eax, edx
mov dword [esp + 0x20], 0xffffffff
jge 0x401408
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x74], edi
add eax, ecx
jmp 0x401408
mov eax, dword [esp + 0x24]
sub eax, dword [esi + 0x28]
mov dword [esp + 0x24], eax
jns 0x40142a
mov ecx, dword [esp + 0x74]
test ecx, ecx
jne 0x40142a
mov ecx, dword [esi + 0x20]
mov dword [esp + 0x74], 1
add eax, ecx
mov dword [esp + 0x24], eax
cmp eax, dword [esi + 0xc]
jge 0x40143b
mov ecx, dword [esp + 0x74]
test ecx, ecx
jne 0x401767
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
mov ecx, dword [esi]
shl edx, 5
sub edx, eax
lea ebx, [ecx + edx*4]
mov ecx, dword [ecx + edx*4]
cmp ecx, 0xffffffff
mov dword [esp + 0x34], ecx
je 0x401408
lea eax, [ebx + 0x20]
push eax
call fcn.00448530
mov edx, dword [esi + 8]
add esp, 4
mov edi, eax
mov ebp, dword [edx + 4]
test ebp, ebp
mov dword [esp + 0x30], ebp
jne 0x4014a2
push 0xd4
push 0x4a1068
call fcn.00418f50
add esp, 4
push eax
push 0x4a1088
push 0x4b6d60
call fcn.00492257
push 0x4b6d60
call fcn.004187d0
add esp, 0x14
mov eax, dword [esp + 0x34]
push eax
push ebp
call fcn.0044eeb0
mov ecx, dword [eax + 0x14]
add esp, 8
mov dword [esp + 0x28], eax
lea ebp, [ecx - 1]
test ebp, ebp
jle 0x401404
cmp dword [eax + 0x30], 0xffffffff
je 0x401404
push 0
lea eax, [ebx + 0x20]
push ecx
push eax
call fcn.004484f0
lea eax, [ebx + 0x20]
push eax
call fcn.004482b0
mov eax, dword [esp + 0x20]
add esp, 0x10
test eax, eax
jne 0x4015ec
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov edx, dword [ecx + 0x30]
push edx
push eax
call fcn.0044ef60
push eax
mov dword [esp + 0x38], eax
call fcn.00448540
mov ecx, dword [esp + 0x34]
add esp, 0xc
cmp eax, dword [ecx + 0x14]
je 0x401547
push 0xe0
push str.D:mugenw_srcmugen_afterimg.c
call fcn.00418f50
add esp, 4
push eax
push 0x4a10c8
push 0x4b6d60
call fcn.00492257
push 0x4b6d60
call fcn.004187d0
add esp, 0x14
mov edx, dword [esi + 0x2c]
mov eax, dword [esp + 0x2c]
push ebp
push 1
push edx
push edi
push eax
call fcn.00448530
add esp, 4
push eax
call fcn.00448e40
mov eax, dword [esi + 0x30]
add esp, 0x14
test eax, eax
je 0x401579
push ebp
push 1
push edi
push edi
call fcn.00448ff0
add esp, 0x10
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x38]
mov eax, dword [esi + 0x34]
push ebp
push 1
push ecx
push edx
push eax
push edi
push edi
call fcn.00448d50
mov ecx, dword [esi + 0x48]
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x40]
push ebp
push 1
push ecx
push edx
push eax
push edi
push edi
call fcn.00448ba0
mov ecx, dword [esi + 0x54]
mov edx, dword [esi + 0x50]
mov eax, dword [esi + 0x4c]
push ebp
push 1
push ecx
push edx
push eax
push edi
push edi
call fcn.00448d50
add esp, 0x54
lea eax, [ebx + 0x20]
mov dword [esp + 0x2c], edi
mov dword [esp + 0x14], 0x43800000
push eax
mov dword [esp + 0x1c], 0x43800000
mov dword [esp + 0x20], 0x43800000
call fcn.00448550
mov ebp, dword [esp + 0x14]
add esp, 4
jmp 0x401663
fld dword [esp + 0x1c]
fmul dword [esi + 0x64]
mov ecx, dword [esp + 0x2c]
lea edi, [ebx + 0x20]
push ecx
push 0xffffffffffffffff
push edi
fstp dword [esp + 0x28]
fld dword [esp + 0x24]
fmul dword [esi + 0x68]
fstp dword [esp + 0x24]
fld dword [esp + 0x20]
fmul dword [esi + 0x6c]
fstp dword [esp + 0x20]
call fcn.004484f0
mov edx, dword [esi + 0x60]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esi + 0x5c]
mov ecx, dword [esi + 0x58]
imul edx, ebp
imul eax, ebp
imul ecx, ebp
push edx
push eax
push ecx
push edi
call fcn.00448650
fld dword [esp + 0x30]
call fcn.004922ac
fld dword [esp + 0x34]
push eax
call fcn.004922ac
fld dword [esp + 0x3c]
push eax
call fcn.004922ac
push eax
push edi
call fcn.004486a0
add esp, 0x2c
lea edx, [esp + 0x38]
inc ebp
push 0x38
push edx
mov dword [esp + 0x18], ebp
call fcn.00418f20
mov eax, dword [ebx + 0x18]
mov ecx, dword [esp + 0x88]
add esp, 8
cmp eax, ecx
jle 0x401687
mov eax, ecx
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x30]
fild dword [esp + 0x78]
add eax, ecx
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x40], eax
lea eax, [ebx + 0x20]
mov dword [esp + 0x44], eax
fadd dword [ebx + 4]
call fcn.004922ac
fild dword [esp + 0x7c]
mov dword [esp + 0x48], eax
fadd dword [ebx + 8]
call fcn.004922ac
mov ecx, dword [esi + 0x70]
mov edx, dword [esi + 0x74]
mov dword [esp + 0x4c], eax
mov eax, dword [esi + 0x78]
mov dword [esp + 0x54], ecx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
mov ecx, dword [ebx + 0x14]
mov dword [esp + 0x6c], ecx
mov edx, dword [ebx + 0xc]
mov dword [esp + 0x60], edx
mov eax, dword [ebx + 0x10]
mov dword [esp + 0x64], eax
fld dword [ebx + 0x1c]
fcomp dword [0x49f2e4]
fnstsw ax
test ah, 0x40
je 0x401736
fld dword [esp + 0x60]
fcomp dword [0x49f2e0]
mov dword [esp + 0x50], 2
fnstsw ax
test ah, 0x40
je 0x401745
fld dword [esp + 0x64]
fcomp dword [0x49f2e0]
fnstsw ax
test ah, 0x40
je 0x401745
mov dword [esp + 0x50], 1
jmp 0x401745
mov dword [esp + 0x50], 3
mov ecx, dword [ebx + 0x1c]
mov dword [esp + 0x68], ecx
mov eax, dword [esi + 8]
lea edx, [esp + 0x38]
push edx
mov ecx, dword [eax + 0x30]
push ecx
call fcn.004048b0
mov eax, dword [esp + 0x28]
add esp, 8
dec eax
mov dword [esp + 0x20], eax
jmp 0x401404
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret