Function at 0x404000
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447069
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x45c050]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0xc]
xor esi, esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xdc], eax
xor eax, eax
push esi
mov dword [ebp - 0xe8], ebx
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0xec], esi
mov dword [ebp - 0x118], esi
mov dword [ebp - 0xf0], esi
call fcn.0040cff9
add esp, 4
mov dword [ebp - 0x130], esi
lea ecx, [ebp - 0x130]
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0x120], esi
mov dword [ebp - 0x11c], 0xf
push esi
push 0x455457
mov byte [ebp - 0x130], 0
call fcn.00402ba0
push ecx
lea eax, [ebp - 0x130]
mov dword [ebp - 4], esi
push eax
lea ecx, [ebp - 0xf8]
call fcn.00403cd0
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x11c]
cmp edx, 0x10
jb 0x4040f3
mov ecx, dword [ebp - 0x130]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4040e9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40473c
push edx
push ecx
call fcn.0042461d
add esp, 8
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x11c], 0xf
mov byte [ebp - 0x130], 0
lea eax, [ebp - 0xf8]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 0xe4]
push eax
mov eax, dword [0x45dc60]
mov ecx, dword [eax + 4]
add ecx, 0x45dc60
call fcn.004055d0
mov ecx, dword [ebp - 0xe0]
test ecx, ecx
je 0x404151
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x404151
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xf4]
test ecx, ecx
je 0x404173
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, eax
test ecx, ecx
je 0x404173
mov eax, dword [ecx]
push 1
call dword [eax]
push 0x104
call fcn.00428987
add esp, 4
mov dword [0x45eff4], eax
test eax, eax
je 0x4041bb
push 0x104
call fcn.00428987
add esp, 4
mov dword [0x45eff8], eax
test eax, eax
jne 0x4041d7
mov eax, dword [0x45eff4]
test eax, eax
je 0x4041bb
push eax
call fcn.0042896c
add esp, 4
mov dword [0x45eff4], 0
mov eax, dword [0x45eff8]
test eax, eax
je 0x4041d7
push eax
call fcn.0042896c
add esp, 4
mov dword [0x45eff8], 0
push 0x268
push 0
push 0x45ead0
call fcn.00426040
push 0xb0
lea eax, [ebp - 0xd0]
mov dword [0x45eac8], 0xffffffff
xorps xmm0, xmm0
mov dword [0x45ead4], 0x45eac0
push 0
push eax
movlpd qword [0x45eac0], xmm0
call fcn.00426040
add esp, 0x14
lea ecx, [ebp - 0xd0]
call fcn.004052c0
mov dword [ebp - 4], 2
mov eax, dword [0x45ed38]
mov dword [0x45ed3c], eax
call fcn.00408850
lea ecx, [ebp - 0xd0]
mov dword [ebp - 4], 0xffffffff
call fcn.00404770
xor edx, edx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xe0], edx
xorps xmm0, xmm0
movq qword [ebp - 0x20], xmm0
lea edi, [ebx*4]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x18], edx
test ebx, ebx
je 0x4042f4
cmp ebx, 0x3fffffff
ja 0x404741
lea esi, [ebx*4]
cmp esi, 0x1000
jb 0x4042bf
lea eax, [esi + 0x23]
cmp eax, esi
jbe 0x404746
push eax
call fcn.004245ed
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x404764
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x4042d0
test esi, esi
je 0x4042ce
push esi
call fcn.004245ed
add esp, 4
jmp 0x4042d0
xor eax, eax
push edi
push dword [ebp - 0xdc]
add esi, eax
mov dword [ebp - 0x20], eax
push eax
mov dword [ebp - 0x18], esi
call fcn.00425ab0
mov edx, dword [ebp - 0x20]
add esp, 0xc
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0xe0], edx
mov dword [ebp - 4], 3
mov eax, 1
mov edi, dword [ebp - 0x1c]
sub edi, edx
mov dword [ebp - 0xdc], eax
sar edi, 2
cmp eax, edi
jae 0x40454a
mov ecx, dword [edx + eax*4]
lea eax, [edx + eax*4]
mov dword [ebp - 0xf4], eax
mov edx, 0x455e64
mov eax, ecx
nop dword [eax]
mov si, word [eax]
cmp si, word [edx]
jne 0x404356
test si, si
je 0x404352
mov si, word [eax + 2]
cmp si, word [edx + 2]
jne 0x404356
add eax, 4
add edx, 4
test si, si
jne 0x404330
xor eax, eax
jmp 0x40435b
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4044f3
lea eax, [edi - 1]
cmp dword [ebp - 0xdc], eax
jae 0x4044f3
mov byte [ebp - 4], 4
xor eax, eax
mov edx, dword [ebp - 0xf4]
mov edx, dword [edx + 4]
mov ecx, edx
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x104], 0
mov dword [ebp - 0x100], 7
mov word [ebp - 0x114], ax
lea esi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4043b0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x114]
call fcn.00402a40
mov byte [ebp - 4], 5
call fcn.00428959
cmp dword [ebp - 0x100], 8
lea esi, [ebp - 0x114]
mov edi, eax
lea eax, [ebp - 0xd4]
cmovae esi, dword [ebp - 0x114]
push 0xa
push eax
push esi
mov dword [edi], 0
call fcn.004293ae
add esp, 0xc
cmp esi, dword [ebp - 0xd4]
je 0x40474b
cmp dword [edi], 0x22
je 0x40475a
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x100]
mov byte [0x45ead8], al
cmp edx, 8
jb 0x404461
mov ecx, dword [ebp - 0x114]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x404457
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404755
push edx
push ecx
call fcn.0042461d
add esp, 8
xor eax, eax
mov dword [ebp - 4], 3
mov edx, dword [ebp - 0x20]
sub ebx, 2
mov word [ebp - 0x114], ax
mov eax, dword [ebp - 0xdc]
mov dword [ebp - 0x104], 0
inc eax
mov dword [ebp - 0x100], 7
mov dword [ebp - 0xe0], edx
mov dword [ebp - 0xe8], ebx
jmp 0x404300
mov eax, 0x455e6c
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x40451e
test dx, dx
je 0x40451a
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x40451e
add ecx, 4
add eax, 4
test dx, dx
jne 0x4044f8
xor eax, eax
jmp 0x404523
sbb eax, eax
or eax, 1
mov edx, dword [ebp - 0xe0]
test eax, eax
jne 0x40453e
dec ebx
mov dword [0x45ead0], 1
mov dword [ebp - 0xe8], ebx
mov eax, dword [ebp - 0xdc]
inc eax
jmp 0x404300
mov esi, dword [ebp - 0xd8]
test esi, esi
jne 0x404577
cmp ebx, 3
jne 0x404577
mov eax, dword [ebp - 0x1c]
sub eax, edx
sar eax, 2
mov ecx, dword [edx + eax*4 - 8]
mov eax, dword [edx + eax*4 - 4]
mov dword [ebp - 0xec], ecx
mov dword [ebp - 0xf0], eax
jmp 0x40457c
mov esi, 0x2002
mov dword [ebp - 4], 0xffffffff
test edx, edx
je 0x4045cc
mov ecx, dword [ebp - 0x18]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x4045ad
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404764
push ecx
push edx
call fcn.0042461d
add esp, 8
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
test esi, esi
jne 0x4046cd
cmp byte [0x45ead8], 3
jbe 0x4045e7
mov esi, 0x200b
jmp 0x4046cd
mov ecx, dword [0x45ed3c]
mov eax, 0x7d8c42b3
mov edi, dword [0x45ed38]
mov esi, 0x1002
sub ecx, edi
mov dword [ebp - 0xd8], esi
imul ecx
xor ebx, ebx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4046cd
xor esi, esi
nop dword [eax + eax]
mov ecx, dword [ebp - 0xec]
lea eax, [edi + 4]
add eax, esi
nop dword [eax + eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x404656
test dx, dx
je 0x404652
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x404656
add eax, 4
add ecx, 4
test dx, dx
jne 0x404630
xor eax, eax
jmp 0x40465b
sbb eax, eax
or eax, 1
test eax, eax
je 0x40468b
mov ecx, dword [0x45ed3c]
mov eax, 0x7d8c42b3
sub ecx, edi
inc ebx
imul ecx
add esi, 0x414
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x404620
mov esi, dword [ebp - 0xd8]
jmp 0x4046cd
push dword [ebp - 0xf0]
imul ecx, ebx, 0x414
push 0x104
push 0x45eae0
mov eax, dword [ecx + edi]
mov dword [0x45eadc], eax
mov eax, dword [ecx + edi]
mov dword [0x45eac4], eax
call fcn.004293d8
add esp, 0xc
push 0x45eae0
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4046ea
mov esi, 0x3000
sub esp, 0x18
mov edx, esi
mov ecx, esp
call fcn.004025a0
call fcn.004024e0
add esp, 0x18
call fcn.00404840
test esi, esi
jne 0x40471e
mov ecx, 0x9a
mov esi, 0x45ead0
mov edi, 0x45ed48
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x45ed48
call fcn.00406180
mov ecx, 0x9a
mov dword [ebp - 0xd8], eax
mov esi, 0x45ed48
mov edi, 0x45ead0
rep movsd dword es:[edi], dword [esi]
mov esi, eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004245df
mov esp, ebp
pop ebp
ret
call fcn.0042888f
call fcn.00406150
call fcn.004015d0
push str.invalid_stoi_argument
call fcn.0040ccfc
call fcn.0042888f
push str.stoi_argument_out_of_range
call fcn.0040cd3c
call fcn.0042888f
int3