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

Disassembly:
sub esp, 0x1b0
mov eax, dword [0x4584a0]
xor eax, esp
mov dword [esp + 0x1ac], eax
push esi
mov esi, dword [esp + 0x1c0]
call fcn.00401320
cmp eax, 5
mov dword [esp + 0x78], eax
jge 0x408ce5
or eax, 0xffffffff
pop esi
mov ecx, dword [esp + 0x1ac]
xor ecx, esp
call fcn.0042ea4d
add esp, 0x1b0
ret 0x10
push ebx
push ebp
push edi
mov eax, 0xf
xor edi, edi
push 4
push str.inst
lea ecx, [esp + 0x18c]
mov dword [esp + 0x150], eax
mov dword [esp + 0x14c], edi
mov byte [esp + 0x13c], 0
mov dword [esp + 0x16c], eax
mov dword [esp + 0x168], edi
mov byte [esp + 0x158], 0
mov dword [esp + 0x1a4], eax
mov dword [esp + 0x1a0], edi
mov byte [esp + 0x190], 0
call fcn.00403600
lea eax, [esp + 0x1a0]
push edi
push eax
call fcn.00407990
add esp, 8
cmp esi, edi
je 0x40908e
cmp byte [esi], 0
je 0x40908e
push esi
lea ecx, [esp + 0x118]
call fcn.00404780
xor esi, esi
push esi
push str._s__:space:_____:space:____d__:space:_________
lea ecx, [esp + 0x5c]
call fcn.004024f0
lea ecx, [esp + 0x7c]
push ecx
lea ecx, [esp + 0x118]
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], esi
mov byte [esp + 0x48], 0
call fcn.00402290
mov ecx, dword [esp + 0x12c]
cmp ecx, 0x10
mov ebp, dword [esp + 0x118]
mov esi, dword [eax]
mov edi, dword [eax + 4]
mov eax, ebp
jae 0x408ddf
lea eax, [esp + 0x118]
mov edx, dword [esp + 0x128]
lea ebx, [edx + eax]
test ebx, ebx
mov dword [esp + 0x7c], ebx
je 0x408e23
cmp ecx, 0x10
mov eax, ebp
jae 0x408dff
lea eax, [esp + 0x118]
cmp eax, dword [esp + 0x7c]
ja 0x408e1f
cmp ecx, 0x10
mov eax, ebp
jae 0x408e13
lea eax, [esp + 0x118]
mov ebx, dword [esp + 0x7c]
add edx, eax
cmp ebx, edx
jbe 0x408e28
jmp 0x408e23
mov ebx, dword [esp + 0x7c]
call fcn.0042ebb0
push 0
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x24]
push eax
push ebx
lea ebp, [esp + 0x124]
push ebp
push edi
push esi
call fcn.00408400
add esp, 0x1c
test al, al
je 0x40904c
nop
mov esi, dword [esp + 0x20]
test esi, esi
mov ecx, dword [esp + 0x24]
je 0x408e8a
mov edx, ecx
sub edx, esi
mov eax, 0x66666667
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 3
jle 0x408e8a
ja 0x408e85
call fcn.0042ebb0
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
lea eax, [esi + 0x3c]
jmp 0x408e8e
lea eax, [esp + 0x34]
cmp byte [eax + 0x10], 0
je 0x408f2c
test esi, esi
je 0x408ecd
mov edx, ecx
sub edx, esi
mov eax, 0x66666667
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 3
jle 0x408ecd
push 3
lea ecx, [esp + 0x20]
call fcn.004016e0
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov edi, eax
jmp 0x408ed1
lea edi, [esp + 0x34]
test esi, esi
je 0x408f10
sub ecx, esi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 3
jle 0x408f10
push 3
lea ecx, [esp + 0x20]
call fcn.004016e0
mov ecx, dword [edi + 0xc]
mov edx, dword [edi + 8]
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
lea ecx, [esp + 0x190]
jmp 0x408fe6
mov ecx, dword [edi + 0xc]
mov edx, dword [edi + 8]
push ecx
lea eax, [esp + 0x38]
mov ecx, dword [eax + 4]
push edx
push ecx
lea ecx, [esp + 0x190]
jmp 0x408fe6
test esi, esi
je 0x408f5f
mov edx, ecx
sub edx, esi
mov eax, 0x66666667
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 4
jle 0x408f5f
push 4
lea ecx, [esp + 0x20]
call fcn.004016e0
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
jmp 0x408f63
lea eax, [esp + 0x34]
cmp byte [eax + 0x10], 0
je 0x408ff6
test esi, esi
je 0x408fa2
mov edx, ecx
sub edx, esi
mov eax, 0x66666667
imul edx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 4
jle 0x408fa2
push 4
lea ecx, [esp + 0x20]
call fcn.004016e0
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
mov edi, eax
jmp 0x408fa6
lea edi, [esp + 0x34]
test esi, esi
je 0x408fcf
sub ecx, esi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 4
jle 0x408fcf
push 4
lea ecx, [esp + 0x20]
call fcn.004016e0
jmp 0x408fd3
lea eax, [esp + 0x34]
mov ecx, dword [edi + 0xc]
mov edx, dword [edi + 8]
push ecx
mov ecx, dword [eax + 4]
push edx
push ecx
lea ecx, [esp + 0x1ac]
mov edx, dword [eax]
push edx
call fcn.004047c0
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
test esi, esi
je 0x409022
sub ecx, esi
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jle 0x409022
ja 0x40901d
call fcn.0042ebb0
mov esi, dword [esp + 0x20]
lea eax, [esi + 0x28]
jmp 0x409026
lea eax, [esp + 0x34]
push 0
lea ecx, [esp + 0x58]
push ecx
mov ecx, dword [eax + 0xc]
lea edx, [esp + 0x24]
push edx
mov edx, dword [eax + 8]
push ebx
push ebp
push ecx
push edx
call fcn.00408400
add esp, 0x1c
test al, al
jne 0x408e50
mov eax, dword [esp + 0x20]
xor esi, esi
cmp eax, esi
je 0x40905f
push eax
call fcn.0042e7ab
add esp, 4
lea ecx, [esp + 0x54]
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
call fcn.0041dfe0
cmp dword [esp + 0x12c], 0x10
jb 0x40908e
mov eax, dword [esp + 0x118]
push eax
call fcn.0042e7ab
add esp, 4
push str..All.dat
lea ecx, [esp + 0x188]
push ecx
push 0x44b560
lea edx, [esp + 0x1ac]
push edx
lea eax, [esp + 0x70]
push eax
call fcn.004067f0
add esp, 0xc
push eax
lea ecx, [esp + 0x120]
push ecx
call fcn.00405040
add esp, 0xc
push eax
lea edx, [esp + 0x170]
push edx
call fcn.004067f0
mov edi, 0x10
add esp, 0xc
cmp dword [esp + 0x12c], edi
jb 0x4090f5
mov eax, dword [esp + 0x118]
push eax
call fcn.0042e7ab
add esp, 4
xor esi, esi
cmp dword [esp + 0x78], edi
mov ebx, 0xf
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x128], esi
mov byte [esp + 0x118], 0
jb 0x409125
mov ecx, dword [esp + 0x64]
push ecx
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x180], edi
mov eax, dword [esp + 0x16c]
jae 0x40913c
lea eax, [esp + 0x16c]
push eax
call fcn.00401650
add esp, 4
test al, al
jne 0x40928f
mov eax, dword [esp + 0x84]
cmp eax, 6
je 0x4091d7
cmp eax, 8
je 0x4091d7
push str..2k.dat
lea edx, [esp + 0x188]
push edx
push 0x44b560
lea eax, [esp + 0x1ac]
push eax
lea ecx, [esp + 0x124]
push ecx
call fcn.004067f0
add esp, 0xc
push eax
lea edx, [esp + 0x6c]
push edx
call fcn.00405040
add esp, 0xc
push eax
lea eax, [esp + 0x24]
push eax
call fcn.004067f0
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x174]
call fcn.004034d0
lea ecx, [esp + 0x1c]
call fcn.00402900
lea ecx, [esp + 0x60]
call fcn.00402900
lea ecx, [esp + 0x114]
call fcn.00402900
jmp 0x40928f
push str..XP.dat
lea ecx, [esp + 0x188]
push ecx
push 0x44b560
lea edx, [esp + 0x1ac]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.004067f0
add esp, 0xc
push eax
lea ecx, [esp + 0x6c]
push ecx
call fcn.00405040
add esp, 0xc
push eax
lea edx, [esp + 0x11c]
push edx
call fcn.004067f0
add esp, 0xc
push 0xffffffffffffffff
push esi
push eax
lea ecx, [esp + 0x174]
call fcn.004034d0
cmp dword [esp + 0x12c], edi
jb 0x409246
mov eax, dword [esp + 0x118]
push eax
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x78], edi
mov dword [esp + 0x12c], ebx
mov dword [esp + 0x128], esi
mov byte [esp + 0x118], 0
jb 0x40926f
mov ecx, dword [esp + 0x64]
push ecx
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x34], edi
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], esi
mov byte [esp + 0x64], 0
jb 0x40928f
mov edx, dword [esp + 0x20]
push edx
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x180], edi
mov eax, dword [esp + 0x16c]
jae 0x4092a6
lea eax, [esp + 0x16c]
push 1
push 0x40
push 1
push eax
lea ecx, [esp + 0x98]
call fcn.00408020
lea ecx, [esp + 0x10]
call fcn.00402850
mov dword [esp + 0x14], eax
mov byte [eax + 0x45], 1
mov eax, dword [esp + 0x14]
mov dword [eax + 4], eax
mov eax, dword [esp + 0x14]
mov dword [eax], eax
mov eax, dword [esp + 0x14]
push 6
mov dword [eax + 8], eax
push str._PATH_
lea ecx, [esp + 0x11c]
mov dword [esp + 0x20], esi
mov dword [esp + 0x134], ebx
mov dword [esp + 0x130], esi
mov byte [esp + 0x120], 0
call fcn.00403600
lea eax, [esp + 0x1a0]
push eax
lea ecx, [esp + 0x118]
push ecx
lea ecx, [esp + 0x24]
call fcn.00403bf0
push eax
lea edx, [esp + 0x58]
push edx
lea ecx, [esp + 0x18]
call fcn.004073d0
lea ecx, [esp + 0x1c]
call fcn.004032a0
cmp dword [esp + 0x12c], edi
jb 0x409355
mov eax, dword [esp + 0x118]
push eax
call fcn.0042e7ab
add esp, 4
push 8
push str._SYSDIR_
lea ecx, [esp + 0x11c]
mov dword [esp + 0x134], ebx
mov dword [esp + 0x130], esi
mov byte [esp + 0x120], 0
call fcn.00403600
lea ecx, [esp + 0x60]
push ecx
call fcn.00407a70
add esp, 4
push eax
lea edx, [esp + 0x118]
push edx
lea ecx, [esp + 0x24]
call fcn.00403bf0
push eax
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x18]
call fcn.004073d0
lea ecx, [esp + 0x1c]
call fcn.004032a0
cmp dword [esp + 0x78], edi
jb 0x4093c8
mov ecx, dword [esp + 0x64]
push ecx
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x12c], edi
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], esi
mov byte [esp + 0x64], 0
jb 0x4093ee
mov edx, dword [esp + 0x118]
push edx
call fcn.0042e7ab
add esp, 4
push 9
push str._PROGDIR_
lea ecx, [esp + 0x11c]
mov dword [esp + 0x134], ebx
mov dword [esp + 0x130], esi
mov byte [esp + 0x120], 0
call fcn.00403600
lea eax, [esp + 0x60]
push eax
call fcn.00405ae0
add esp, 4
push eax
lea ecx, [esp + 0x118]
push ecx
lea ecx, [esp + 0x24]
call fcn.00403bf0
push eax
lea edx, [esp + 0x58]
push edx
lea ecx, [esp + 0x18]
call fcn.004073d0
lea ecx, [esp + 0x1c]
call fcn.004032a0
cmp dword [esp + 0x78], edi
jb 0x409461
mov eax, dword [esp + 0x64]
push eax
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x12c], edi
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], esi
mov byte [esp + 0x64], 0
jb 0x409487
mov ecx, dword [esp + 0x118]
push ecx
call fcn.0042e7ab
add esp, 4
mov edx, dword [esp + 0x88]
mov eax, dword [edx + 4]
mov ecx, dword [esp + eax + 0x90]
lea eax, [esp + eax + 0x88]
and cl, 6
neg cl
sbb ecx, ecx
not ecx
test eax, ecx
je 0x409726
mov ebp, dword [esp + 0x148]
mov ecx, dword [esp + 0x134]
mov ebx, edi
cmp ebp, ebx
mov edx, dword [esp + 0x144]
mov eax, ecx
jae 0x4094d4
lea eax, [esp + 0x134]
lea edi, [edx + eax]
test edi, edi
je 0x4094ff
cmp ebp, ebx
mov eax, ecx
jae 0x4094e8
lea eax, [esp + 0x134]
cmp eax, edi
ja 0x4094ff
cmp ebp, ebx
mov eax, ecx
jae 0x4094f9
lea eax, [esp + 0x134]
add eax, edx
cmp edi, eax
jbe 0x409519
call fcn.0042ebb0
mov ebp, dword [esp + 0x148]
mov edx, dword [esp + 0x144]
mov ecx, dword [esp + 0x134]
cmp ebp, ebx
jb 0x40987a
test ecx, ecx
mov esi, ecx
je 0x40954b
cmp ebp, ebx
mov eax, ecx
jae 0x409534
lea eax, [esp + 0x134]
cmp eax, esi
ja 0x40954b
cmp ebp, ebx
mov eax, ecx
jae 0x409545
lea eax, [esp + 0x134]
add edx, eax
cmp esi, edx
jbe 0x409550
call fcn.0042ebb0
push edi
lea eax, [esp + 0x134]
push eax
push esi
push eax
lea ecx, [esp + 0x64]
push ecx
mov ecx, eax
call fcn.00402930
mov ecx, dword [esp + 0x164]
cmp ecx, ebx
mov edx, dword [esp + 0x150]
mov eax, edx
jae 0x409582
lea eax, [esp + 0x150]
mov ebp, dword [esp + 0x160]
lea edi, [eax + ebp]
test edi, edi
je 0x4095b4
cmp ecx, ebx
mov eax, edx
jae 0x40959d
lea eax, [esp + 0x150]
cmp eax, edi
ja 0x4095b4
cmp ecx, ebx
mov eax, edx
jae 0x4095ae
lea eax, [esp + 0x150]
add eax, ebp
cmp edi, eax
jbe 0x4095ce
call fcn.0042ebb0
mov ecx, dword [esp + 0x164]
mov ebp, dword [esp + 0x160]
mov edx, dword [esp + 0x150]
cmp ecx, ebx
jb 0x409886
test edx, edx
mov esi, edx
je 0x409600
cmp ecx, ebx
mov eax, edx
jae 0x4095e9
lea eax, [esp + 0x150]
cmp eax, esi
ja 0x409600
cmp ecx, ebx
mov eax, edx
jae 0x4095fa
lea eax, [esp + 0x150]
add ebp, eax
cmp esi, ebp
jbe 0x409605
call fcn.0042ebb0
push edi
lea eax, [esp + 0x150]
push eax
push esi
push eax
lea ecx, [esp + 0x64]
push ecx
mov ecx, eax
call fcn.00402930
mov edx, dword [esp + 0x88]
mov ecx, dword [edx + 4]
push 0xa
lea ecx, [esp + ecx + 0x8c]
call fcn.00406d40
lea ecx, [esp + 0x88]
push eax
lea eax, [esp + 0x134]
push eax
push ecx
call fcn.00407e30
lea edx, [esp + 0x13c]
push edx
call fcn.004071b0
mov ebp, dword [esp + 0x158]
mov ecx, dword [esp + 0x144]
add esp, 0x10
cmp dword [esp + 0x144], 0
je 0x4096fd
cmp ebp, ebx
mov eax, ecx
jae 0x409683
lea eax, [esp + 0x134]
cmp byte [eax], 0x3b
je 0x4096fd
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x134]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.00405bc0
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x158]
call fcn.004034d0
cmp dword [esp + 0x34], ebx
jb 0x4096c6
mov eax, dword [esp + 0x20]
push eax
call fcn.0042e7ab
add esp, 4
lea ecx, [esp + 0x14c]
push ecx
call fcn.00408430
mov esi, eax
add esp, 4
test esi, esi
je 0x4096ef
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
mov edx, dword [esi]
mov eax, dword [edx]
push 1
mov ecx, esi
call eax
mov ecx, dword [esp + 0x134]
mov ebp, dword [esp + 0x148]
mov edx, dword [esp + 0x88]
mov eax, dword [edx + 4]
mov edx, dword [esp + eax + 0x90]
lea eax, [esp + eax + 0x88]
and dl, 6
neg dl
sbb edx, edx
not edx
test eax, edx
jne 0x4094c0
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
mov esi, ecx
push esi
lea eax, [esp + 0x64]
push eax
call fcn.00407d60
mov ecx, dword [esp + 0x14]
push ecx
call fcn.0042e7ab
xor esi, esi
add esp, 4
lea ecx, [esp + 0xe0]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], esi
call fcn.004069c0
lea edx, [esp + 0xe0]
push edx
mov dword [esp + 0xe4], vtable.std::ios_base.0
call fcn.00409d58
mov edi, 0x10
add esp, 4
cmp dword [esp + 0x180], edi
jb 0x40979c
mov eax, dword [esp + 0x16c]
push eax
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x1b8], edi
mov ebx, 0xf
mov dword [esp + 0x180], ebx
mov dword [esp + 0x17c], esi
mov byte [esp + 0x16c], 0
jb 0x4097d0
mov ecx, dword [esp + 0x1a4]
push ecx
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x19c], edi
mov dword [esp + 0x1b8], ebx
mov dword [esp + 0x1b4], esi
mov byte [esp + 0x1a4], 0
jb 0x4097ff
mov edx, dword [esp + 0x188]
push edx
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x164], edi
mov dword [esp + 0x19c], ebx
mov dword [esp + 0x198], esi
mov byte [esp + 0x188], 0
jb 0x40982e
mov eax, dword [esp + 0x150]
push eax
call fcn.0042e7ab
add esp, 4
cmp dword [esp + 0x148], edi
pop edi
pop ebp
mov dword [esp + 0x15c], ebx
mov dword [esp + 0x158], esi
mov byte [esp + 0x148], 0
pop ebx
jb 0x409860
mov ecx, dword [esp + 0x128]
push ecx
call fcn.0042e7ab
add esp, 4
mov ecx, dword [esp + 0x1b0]
pop esi
xor ecx, esp
xor eax, eax
call fcn.0042ea4d
add esp, 0x1b0
ret 0x10
lea esi, [esp + 0x134]
jmp 0x409527
lea esi, [esp + 0x150]
jmp 0x4095dc