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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x42cf3d
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x2c74
call fcn.004233c0
mov eax, dword [0x438304]
xor eax, esp
mov dword [esp + 0x2c70], eax
push ebx
push esi
push edi
mov eax, dword [0x438304]
xor eax, esp
push eax
lea eax, [esp + 0x2c88]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov edi, dword [ebp + 8]
push 0x800
mov dword [esp + 0x18], eax
lea eax, [esp + 0x480]
push 0
push eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], edx
call fcn.00422530
add esp, 0xc
push 0x80
lea ecx, [esp + 0x400]
push 0
push ecx
call fcn.00422530
add esp, 0xc
push 0x43357c
lea esi, [esp + 0x1c0]
call fcn.00411960
add esp, 4
test eax, eax
je 0x4055c1
lea edx, [esp + 0x3d4]
push edx
push edi
mov edi, dword [ebp + 0xc]
mov ebx, esi
call fcn.00412010
add esp, 8
test eax, eax
je 0x4055c1
mov eax, dword [esp + 0x3e0]
cmp eax, 0x80
jae 0x4055c1
push eax
mov eax, dword [esp + 0x3e0]
push eax
lea ecx, [esp + 0x404]
push ecx
call fcn.00422990
add esp, 0xc
lea edx, [esp + 0x3fc]
push edx
call dword [0x42e248]
mov edi, eax
test edi, edi
je 0x4055c1
mov esi, dword [esp + 0x10]
mov eax, esi
lea edx, [eax + 1]
jmp 0x405480
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x405480
sub eax, edx
mov edx, dword [esp + 0x3e4]
jne 0x4054db
mov eax, dword [esp + 0x3dc]
mov ecx, dword [esp + 0x3e0]
push 0x43338c
push 0x484cb8
push 0x433594
push eax
mov eax, dword [esp + 0x3f8]
push ecx
push edx
push eax
push 0x433510
push 0x7ff
lea ecx, [esp + 0x4a0]
push 0x800
push ecx
call fcn.00421eb6
add esp, 0x2c
jmp 0x405504
mov eax, dword [esp + 0x3e8]
push esi
push edx
push eax
push 0x433598
push 0x7ff
lea ecx, [esp + 0x490]
push 0x800
push ecx
call fcn.00421eb6
add esp, 0x1c
push 6
push 1
push 2
call dword [0x42e244]
mov esi, eax
cmp esi, 0xffffffff
jne 0x405521
call fcn.00401c40
jmp 0x4055c1
mov edx, 2
push 0x50
mov word [esp + 0x20], dx
call dword [0x42e240]
mov word [esp + 0x1e], ax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [eax]
test eax, eax
je 0x4055ac
mov ebx, dword [0x42e23c]
jmp 0x405550
mov eax, dword [eax]
push eax
mov dword [esp + 0x24], eax
call ebx
push eax
call fcn.00401c40
add esp, 4
push 0x10
lea eax, [esp + 0x20]
push eax
push esi
call dword [0x42e238]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40559a
mov ecx, dword [esp + 0x20]
push ecx
call ebx
push eax
call fcn.00401c40
mov eax, dword [esp + 0x14]
add eax, 4
mov dword [esp + 0x14], eax
mov eax, dword [eax]
add esp, 4
test eax, eax
jne 0x405550
jmp 0x4055b5
mov edx, dword [esp + 0x20]
push edx
call ebx
push eax
call fcn.00401c40
add esp, 4
jmp 0x4055b0
mov edi, dword [esp + 0x14]
cmp edi, 0xffffffff
jne 0x4055e7
call fcn.00401c40
push esi
call dword [0x42e264]
xor eax, eax
mov ecx, dword [esp + 0x2c88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c70]
xor ecx, esp
call fcn.00421232
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x47c]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4055f1
push 0
sub eax, edx
push eax
lea eax, [esp + 0x484]
push eax
push esi
call dword [0x42e230]
cmp eax, 0xffffffff
jne 0x405623
lea ecx, [esp + 0x47c]
push ecx
call fcn.00401c40
add esp, 4
jmp 0x4055ba
push 0x2000
lea edx, [esp + 0xc80]
push 0
push edx
call fcn.00422530
mov ebx, dword [0x42e22c]
add esp, 0xc
push 0
push 0x1fff
lea eax, [esp + 0xc84]
push eax
push esi
call ebx
mov edi, eax
cmp edi, 0xffffffff
jne 0x40565e
call fcn.00401c40
push 0xc9
lea ecx, [esp + 0xd8]
mov dword [esp + 0x14], 0
call fcn.00417150
mov dword [esp + 0x2c90], 0
test edi, edi
jle 0x40575c
lea ebx, [ebx]
push edi
lea ecx, [esp + 0xc80]
push ecx
lea ecx, [esp + 0xdc]
call fcn.00418020
cmp eax, 0xffffffff
je 0x4058f9
lea ecx, [esp + 0xd4]
call fcn.00416ae0
cmp eax, 3
je 0x40575c
lea ecx, [esp + 0xd4]
call fcn.00416ae0
cmp eax, 4
je 0x40575c
push 0x2000
lea edx, [esp + 0xc80]
push 0
push edx
call fcn.00422530
add esp, 0xc
cmp dword [ebp + 0x14], 0
je 0x405706
push 0
push 0x2000
lea eax, [esp + 0xc84]
push eax
jmp 0x405746
call fcn.004052e0
test al, al
je 0x405720
push 0
push 0x2000
lea ecx, [esp + 0xc84]
push ecx
jmp 0x405746
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, 3
jge 0x40575c
call fcn.004052e0
test al, al
je 0x40575c
push 0
push 0x2000
lea edx, [esp + 0xc84]
push edx
push esi
call ebx
mov edi, eax
cmp edi, 0xffffffff
je 0x4058ef
test edi, edi
jg 0x405690
lea ecx, [esp + 0xd4]
call fcn.00416ae0
cmp eax, 3
je 0x405782
lea ecx, [esp + 0xd4]
call fcn.00416ae0
cmp eax, 4
jne 0x4058f9
push 1
lea ecx, [esp + 0xd8]
call fcn.004174e0
mov ebx, eax
xor ecx, ecx
mov eax, 0xf
mov dword [esp + 0x5c], eax
mov dword [esp + 0x58], ecx
mov byte [esp + 0x48], cl
mov dword [esp + 0x78], eax
mov dword [esp + 0x74], ecx
mov byte [esp + 0x64], cl
mov dword [esp + 0x40], eax
mov dword [esp + 0x3c], ecx
mov byte [esp + 0x2c], cl
mov dword [esp + 0x94], eax
mov dword [esp + 0x90], ecx
mov byte [esp + 0x80], cl
mov byte [esp + 0x2c90], 4
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push ecx
mov ecx, ebx
call edx
mov edi, eax
test edi, edi
je 0x40582b
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
test edx, edx
jne 0x4057fb
test eax, eax
je 0x40582b
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
lea ecx, [esp + 0x48]
call fcn.0040a660
cmp dword [esp + 0x5c], 0x10
mov eax, dword [esp + 0x48]
jae 0x40581c
lea eax, [esp + 0x48]
mov ecx, dword [esp + 0x58]
mov edx, dword [edi]
mov edx, dword [edx + 0xc]
push ecx
push eax
mov ecx, edi
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push 1
mov ecx, ebx
call edx
mov edi, eax
test edi, edi
je 0x40587d
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
test edx, edx
jne 0x40584d
test eax, eax
je 0x40587d
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
lea ecx, [esp + 0x64]
call fcn.0040a660
cmp dword [esp + 0x78], 0x10
mov eax, dword [esp + 0x64]
jae 0x40586e
lea eax, [esp + 0x64]
mov ecx, dword [esp + 0x74]
mov edx, dword [edi]
mov edx, dword [edx + 0xc]
push ecx
push eax
mov ecx, edi
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0x14]
push 2
mov ecx, ebx
call edx
mov edi, eax
test edi, edi
je 0x4058cf
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
test edx, edx
jne 0x40589f
test eax, eax
je 0x4058cf
mov eax, dword [edi]
mov edx, dword [eax + 0x14]
mov ecx, edi
call edx
lea ecx, [esp + 0x2c]
call fcn.0040a660
cmp dword [esp + 0x40], 0x10
mov eax, dword [esp + 0x2c]
jae 0x4058c0
lea eax, [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
mov edx, dword [edi]
mov edx, dword [edx + 0xc]
push ecx
push eax
mov ecx, edi
call edx
cmp dword [ebp + 0x18], 0
je 0x40591c
push 0xffffffffffffffff
push 0
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x8c]
call fcn.0040aed0
jmp 0x405981
call fcn.00401c40
jmp 0x40575c
push esi
call dword [0x42e264]
lea ecx, [esp + 0xd4]
mov dword [esp + 0x2c90], 0xffffffff
call fcn.00417230
jmp 0x4055c1
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x4c]
push edx
lea eax, [esp + 0xc0]
push eax
call fcn.0040bf10
add esp, 0xc
lea ecx, [esp + 0x2c]
push ecx
push eax
lea edx, [esp + 0xa4]
push edx
mov byte [esp + 0x2c9c], 5
call fcn.0040be40
add esp, 0xc
push eax
lea ecx, [esp + 0x84]
mov byte [esp + 0x2c94], 6
call fcn.0040ad60
lea ecx, [esp + 0x9c]
call fcn.0040a3d0
lea ecx, [esp + 0xb8]
call fcn.0040a3d0
mov eax, dword [esp + 0x90]
mov edi, dword [esp + 0x18]
push eax
mov dword [edi], eax
call fcn.00421b5e
mov ecx, dword [esp + 0x18]
add esp, 4
cmp dword [esp + 0x94], 0x10
mov dword [ecx], eax
mov ecx, dword [esp + 0x80]
jae 0x4059b5
lea ecx, [esp + 0x80]
mov edx, dword [edi]
push edx
push ecx
push eax
call fcn.00422990
add esp, 0xc
push esi
call dword [0x42e264]
lea ecx, [esp + 0x80]
call fcn.0040a3d0
lea ecx, [esp + 0x2c]
call fcn.0040a3d0
lea ecx, [esp + 0x64]
call fcn.0040a3d0
lea ecx, [esp + 0x48]
call fcn.0040a3d0
lea ecx, [esp + 0xd4]
mov dword [esp + 0x2c90], 0xffffffff
call fcn.00417230
mov eax, 1
jmp 0x4055c3