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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x4064
call fcn.004e36a0
push ebx
push esi
push edi
mov edi, ecx
xor esi, esi
xor eax, eax
mov dword [esp + 0x34], esi
xor edx, edx
mov dword [esp + 0x40], eax
mov dword [esp + 0xc], edx
mov ebx, dword [edi + 4]
cmp ebx, 2
je 0x409949
cmp ebx, 3
je 0x409949
cmp ebx, 4
jne 0x4099a0
mov eax, dword [edi]
cmp dword [eax + 0x20], edx
je 0x409ed1
mov eax, dword [edi + 0x920]
mov dword [esp + 0x10], edx
xor edx, edx
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], 4
mov ecx, dword [esp + eax*4 + 0x10]
mov eax, 0x1000
imul ecx, dword [edi + 0x924]
div ecx
xor edx, edx
mov dword [esp + 0x40], eax
cmp ebx, 1
je 0x4099aa
cmp ebx, 3
jne case.default.0x409a33
mov eax, dword [edi]
cmp dword [eax + 0x24], esi
je 0x409ed1
mov eax, dword [edi + 0x3d8]
xor edx, edx
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], 4
mov ecx, dword [esp + eax*4 + 0x10]
mov eax, 0x1000
imul ecx, dword [edi + 0x3dc]
div ecx
mov edx, eax
mov dword [esp + 0xc], edx
jmp case.default.0x409a33
mov edx, dword [esp + 0xc]
xor ecx, ecx
lea ebx, [edi + 0xc]
xor eax, eax
lock cmpxchg dword [ebx], ecx
mov ebx, dword [esp + 0x40]
cmp eax, 2
jne 0x409ec8
cmp dword [esp + 0x34], 0
jne 0x409ec8
mov eax, dword [edi + 4]
dec eax
cmp eax, 3
ja case.default.0x409a33
jmp dword [eax*4 + 0x409ee0]
mov ecx, dword [edi + 0xa2c]
mov eax, dword [edi + 0x4e4]
cmp ecx, eax
mov dword [esp + 0x44], 0
cmovae ecx, eax
mov dword [esp + 0x38], ecx
test ecx, ecx
je case.default.0x409a33
mov eax, dword [esp + 0x44]
nop
mov edx, dword [edi]
sub ecx, eax
lea eax, [esp + 0x68]
cmp ecx, ebx
push eax
mov eax, ebx
cmovbe eax, ecx
push eax
lea eax, [esp + 0x78]
push eax
mov eax, dword [edx + 0x20]
push edi
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x409ebb
mov eax, dword [esp + 0x68]
xor ebx, ebx
mov dword [esp + 0x3c], eax
xor edx, edx
mov eax, dword [edi + 0x818]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], 4
mov ecx, dword [esp + eax*4 + 0x10]
mov eax, 0x1000
imul ecx, dword [edi + 0x81c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
div ecx
mov dword [esp + 0x20], 4
xor edx, edx
mov esi, eax
mov dword [esp + 0x24], 4
mov eax, dword [edi + 0x2d0]
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x5c], ebx
mov ecx, dword [esp + eax*4 + 0x10]
mov eax, 0x1000
imul ecx, dword [edi + 0x2d4]
div ecx
lea ecx, [esp + 0x28]
push ecx
cmp esi, eax
lea ecx, [esp + 0x3074]
push ecx
cmovb eax, esi
lea ecx, [esp + 0x60]
mov dword [esp + 0x30], eax
lea edx, [esp + 0x78]
mov eax, dword [esp + 0x44]
push ecx
lea ecx, [edi + 0xa40]
mov dword [esp + 0x64], eax
call fcn.00421910
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x409a03
nop dword [eax + eax]
mov ecx, dword [esp + 0x28]
mov eax, ecx
or eax, dword [esp + 0x2c]
je 0x409c7a
push ecx
lea eax, [esp + 0x3074]
mov ecx, edi
push eax
lea edx, [esp + 0x2078]
call fcn.00408ad0
mov eax, dword [esp + 0x60]
lea edx, [esp + 0x2078]
sub dword [esp + 0x44], eax
add ebx, eax
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x50], eax
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x107c]
mov dword [esp + 0x60], ecx
push eax
lea eax, [esp + 0x60]
mov dword [esp + 0x70], ebx
push eax
lea ecx, [edi + 0x4f8]
mov dword [esp + 0x60], 0
call fcn.00421910
mov esi, eax
add esp, 0x14
test esi, esi
jne 0x409c6e
mov eax, dword [edi]
lea ecx, [esp + 0x1070]
push 0
push dword [esp + 0x4c]
mov eax, dword [eax + 0x24]
push ecx
push edi
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x409c6e
mov ecx, dword [esp + 0x28]
sub ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x2c]
sbb edx, eax
mov dword [esp + 0x28], ecx
mov eax, ecx
mov dword [esp + 0x2c], edx
or eax, edx
je 0x409ca1
mov eax, dword [esp + 0xc]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x1074]
mov dword [esp + 0x54], ecx
push eax
lea eax, [esp + 0x58]
mov dword [esp + 0x5c], edx
push eax
lea edx, [esp + 0x207c]
mov dword [esp + 0x58], esi
lea ecx, [edi + 0x4f8]
call fcn.00421910
mov esi, eax
add esp, 0xc
test esi, esi
je 0x409bf2
mov ebx, dword [esp + 0x60]
mov dword [esp + 0x34], 1
test ebx, ebx
je 0x409a03
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x38]
add eax, ebx
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x44], eax
cmp eax, ecx
jb 0x409a60
jmp 0x409a03
mov eax, dword [edi + 0x818]
xor edx, edx
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], 4
mov ecx, dword [esp + eax*4 + 0x10]
mov eax, 0x1000
imul ecx, dword [edi + 0x81c]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
div ecx
mov ecx, dword [edi + 0x2d0]
xor edx, edx
mov esi, eax
mov dword [esp + 0x20], 4
mov dword [esp + 0x24], 4
mov eax, 0x1000
mov ebx, dword [esp + 0x60]
mov ecx, dword [esp + ecx*4 + 0x10]
imul ecx, dword [edi + 0x2d4]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], 1
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
div ecx
mov dword [esp + 0x20], 4
lea ecx, [esp + 0x28]
cmp esi, eax
mov dword [esp + 0x24], 4
push ecx
cmovb eax, esi
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], eax
lea ecx, [esp + 0x3074]
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x74]
mov dword [esp + 0x5c], eax
mov eax, dword [edi + 0x920]
push ecx
lea ecx, [esp + 0x60]
mov dword [esp + 0x64], 0
push ecx
mov eax, dword [esp + eax*4 + 0x1c]
lea ecx, [edi + 0xa40]
imul eax, dword [edi + 0x924]
imul eax, ebx
add edx, eax
call fcn.00421910
mov esi, eax
add esp, 0xc
test esi, esi
je 0x409b70
jmp 0x409c7a
mov eax, dword [edi + 0xa2c]
xor ebx, ebx
mov dword [esp + 0x38], eax
test eax, eax
je case.default.0x409a33
nop dword [eax]
mov edx, dword [edi]
mov ecx, eax
lea eax, [esp + 0x64]
sub ecx, ebx
push eax
mov eax, dword [esp + 0x44]
cmp ecx, eax
cmovbe eax, ecx
push eax
lea eax, [esp + 0x78]
push eax
mov eax, dword [edx + 0x20]
push edi
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x409ebb
mov edx, dword [esp + 0x64]
test edx, edx
je 0x409a03
lea eax, [esp + 0x70]
mov ecx, edi
push eax
call fcn.00409130
add ebx, dword [esp + 0x68]
add esp, 4
mov eax, dword [esp + 0x38]
cmp ebx, eax
jb 0x409df0
jmp 0x409a03
mov eax, dword [edi + 0x4e4]
xor ebx, ebx
mov dword [esp + 0x38], eax
test eax, eax
je case.default.0x409a33
nop dword [eax]
sub eax, ebx
mov esi, edx
cmp eax, edx
mov ecx, edi
cmovbe esi, eax
lea eax, [esp + 0x1070]
push eax
mov edx, esi
call fcn.00408d60
mov eax, dword [edi]
lea ecx, [esp + 0x70]
add esp, 4
mov eax, dword [eax + 0x24]
push ecx
push esi
lea ecx, [esp + 0x1078]
push ecx
push edi
call eax
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x409ebb
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0xc]
test eax, eax
je case.default.0x409a33
add ebx, eax
mov eax, dword [esp + 0x38]
cmp ebx, eax
jb 0x409e60
jmp 0x409a03
mov dword [esp + 0x34], 1
jmp 0x409a03
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xffffffe3
pop ebx
mov esp, ebp
pop ebp
ret