Function at 0x404d80
Capabilities:
Check if file exists
Get disk size

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55e0ed
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x5d1858]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x28], ecx
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x20], eax
xor edx, edx
mov dword [ebp - 0x50], eax
mov eax, dword [ebx]
mov dword [ebp - 0x44], ebx
cmp dword [eax - 0xc], edx
setne dl
mov dword [ebp - 0x80], edx
test edx, edx
je 0x405521
cmp dword [ecx + 0xa4], 0
je 0x405552
push 0x571e80
lea ecx, [ebp - 0x4c]
call fcn.00401e90
mov eax, dword [ebx]
xor edi, edi
xorps xmm0, xmm0
or ebx, 0xffffffff
cmp dword [eax - 0xc], 1
mov dword [ebp - 4], 0
mov dword [ebp - 0x5c], 0
movlpd qword [ebp - 0x58], xmm0
jle 0x405431
add eax, 2
push 0xa
push eax
call fcn.0054472b
mov esi, eax
add esp, 8
test esi, esi
je 0x405431
mov ecx, dword [ebp - 0x44]
sub esi, dword [ecx]
sar esi, 1
cmp esi, ebx
je 0x405431
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x38], eax
mov eax, esi
sub eax, edi
push eax
push edi
lea eax, [ebp - 0x3c]
push eax
call fcn.00405e90
mov edi, dword [ebp - 0x3c]
inc esi
mov eax, dword [edi - 0xc]
mov byte [ebp - 4], 1
mov dword [ebp - 0x60], esi
test eax, eax
je 0x4053b1
jg 0x404e71
or eax, 0xffffffff
jmp 0x404e89
push 0x20
push edi
call fcn.0054472b
add esp, 8
test eax, eax
jne 0x404e85
or eax, 0xffffffff
jmp 0x404e89
sub eax, edi
sar eax, 1
mov dword [ebp - 0x2c], eax
inc eax
mov dword [ebp - 0x20], eax
js 0x404eb1
cmp eax, dword [edi - 0xc]
jge 0x404eb1
lea eax, [edi + eax*2]
push 0x20
push eax
call fcn.0054472b
mov esi, eax
add esp, 8
test esi, esi
je 0x404eb1
sub esi, edi
sar esi, 1
jmp 0x404eb4
or esi, 0xffffffff
test esi, esi
js 0x404ed7
cmp esi, dword [edi - 0xc]
jge 0x404ed7
lea eax, [edi + esi*2]
push 0x2f
push eax
call fcn.0054472b
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x404ed7
sub ebx, edi
sar ebx, 1
jmp 0x404eda
or ebx, 0xffffffff
lea eax, [ebx + 1]
test eax, eax
js 0x404f01
cmp eax, dword [edi - 0xc]
jge 0x404f01
lea eax, [edi + eax*2]
push 0x2f
push eax
call fcn.0054472b
add esp, 8
test eax, eax
je 0x404f01
sub eax, edi
sar eax, 1
mov dword [ebp - 0x24], eax
jmp 0x404f08
mov dword [ebp - 0x24], 0xffffffff
sub esi, dword [ebp - 0x2c]
lea eax, [ebp - 0x78]
dec esi
push esi
push dword [ebp - 0x20]
lea ecx, [ebp - 0x3c]
push eax
call fcn.00405e90
mov eax, dword [ebp - 0x24]
sub eax, ebx
dec eax
push eax
lea eax, [ebx + 1]
push eax
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], 2
call fcn.00405e90
mov eax, dword [edi - 0xc]
sub eax, dword [ebp - 0x24]
lea ecx, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x34]
push eax
mov byte [ebp - 4], 3
call fcn.00406cd0
push 0xd
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 4
call fcn.00407a00
push 0x5c
push 0x2f
lea ecx, [ebp - 0x34]
call fcn.00406c10
mov eax, dword [ebp - 0x4c]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4054a1
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx]
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x404fa6
test dx, dx
je 0x404fa2
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x404fa6
add ecx, 4
add eax, 4
test dx, dx
jne 0x404f80
xor eax, eax
jmp 0x404fab
sbb eax, eax
or eax, 1
mov ebx, dword [ebp - 0x34]
test eax, eax
setne al
test al, al
je 0x4051a1
lea eax, [ebp - 0x30]
push eax
lea ecx, [ebp - 0x4c]
call fcn.00401fa0
push 0x571e80
lea ecx, [ebp - 0x1c]
call fcn.00401e90
mov eax, dword [ebp - 0x1c]
mov edx, 1
mov ecx, dword [eax - 8]
sub edx, dword [eax - 4]
sub ecx, 0x100
or ecx, edx
mov byte [ebp - 4], 5
jge 0x405000
push 0x100
lea ecx, [ebp - 0x1c]
call fcn.00403570
mov eax, dword [ebp - 0x1c]
push 0
push eax
push 0
push 0
push ebx
call fcn.005442f0
mov eax, dword [ebp - 0x1c]
push dword [eax - 8]
push eax
call fcn.00544029
mov ecx, eax
add esp, 0x1c
test ecx, ecx
js 0x405427
mov eax, dword [ebp - 0x1c]
cmp ecx, dword [eax - 8]
jg 0x405427
mov dword [eax - 0xc], ecx
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x1c]
add eax, 0xb8
push ecx
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.004042b0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
push eax
mov byte [ebp - 4], 6
call fcn.00402240
lea esi, [eax + 0x10]
add esp, 0x10
mov dword [ebp - 0x24], esi
push dword [ebp - 0x48]
mov byte [ebp - 4], 7
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4050db
mov ebx, dword [ebp - 0x28]
mov edi, 2
push edi
push dword [ebp - 0x1c]
lea eax, [ebp - 0x24]
push str._s__d_
push eax
call fcn.00402390
mov esi, dword [ebp - 0x24]
push esi
push dword [ebx + 0xb8]
lea eax, [ebp - 0x48]
push str._s_s
push eax
inc edi
call fcn.00402390
add esp, 0x20
push dword [ebp - 0x48]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405086
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x34]
lea eax, [ebp - 0x48]
push eax
lea ecx, [ecx + 0xb8]
call fcn.00401fa0
jmp 0x4050f0
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
push dword [eax - 0xc]
lea ecx, [ecx + 0xb8]
push eax
call fcn.00404660
lea eax, [ebp - 0x34]
push eax
mov eax, dword [ebp - 0x28]
add eax, 0xb8
push eax
lea eax, [ebp - 0x7c]
push eax
call fcn.004042b0
add esp, 0xc
mov ecx, dword [ebp - 0x28]
add ecx, 0x90
push eax
push dword [ecx + 8]
mov byte [ebp - 4], 8
call fcn.0042341e
mov edx, dword [ebp - 0x7c]
add edx, 0xfffffff0
mov byte [ebp - 4], 7
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405140
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40515e
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x48]
add edx, 0xfffffff0
or esi, 0xffffffff
mov byte [ebp - 4], 5
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405181
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
mov ecx, esi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4051a1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0x28
call fcn.004203ca
mov esi, eax
add esp, 4
mov dword [ebp - 0x68], esi
mov byte [ebp - 4], 9
test esi, esi
je 0x4051ed
push dword [ebp - 0x2c]
lea eax, [ebp - 0x74]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00405e20
mov ecx, dword [ebp - 0x50]
push dword [ebp - 0x5c]
or ecx, 1
push dword [eax]
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x20], ecx
mov ecx, esi
mov byte [ebp - 4], 0xa
call fcn.00403c30
inc dword [ebp - 0x5c]
mov esi, eax
mov dword [ebp - 0x24], eax
jmp 0x4051f2
xor esi, esi
mov dword [ebp - 0x24], esi
mov eax, dword [ebp - 0x50]
mov dword [ebp - 4], 4
test al, 1
je 0x405223
mov edx, dword [ebp - 0x74]
and eax, 0xfffffffe
add edx, 0xfffffff0
mov dword [ebp - 0x50], eax
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405223
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x28]
lea ecx, [ebp - 0x34]
add eax, 0xb8
push ecx
push eax
lea eax, [ebp - 0x84]
push eax
call fcn.004042b0
add esp, 0xc
mov edx, dword [eax]
lea eax, [esi + 8]
mov byte [ebp - 4], 0xc
mov dword [ebp - 0x20], eax
test edx, edx
jne 0x405253
xor ecx, ecx
jmp 0x405272
mov ecx, edx
lea esi, [ecx + 2]
jmp 0x405260
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405260
mov eax, dword [ebp - 0x20]
sub ecx, esi
sar ecx, 1
push ecx
push edx
mov ecx, eax
call fcn.00403740
mov edx, dword [ebp - 0x84]
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40529f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp - 0x28]
push 0
push dword [esi + 0x7c]
lea ecx, [esi + 0x74]
call fcn.00405f40
mov ecx, dword [ebp - 0x24]
mov dword [eax + 8], ecx
mov ecx, dword [esi + 0x7c]
test ecx, ecx
je 0x4052c0
mov dword [ecx], eax
jmp 0x4052c3
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], eax
mov esi, dword [ebp - 0x78]
xor eax, eax
mov edx, dword [esi - 0xc]
xorps xmm0, xmm0
movlpd qword [ebp - 0x58], xmm0
mov dword [ebp - 0x20], eax
test edx, edx
jle 0x405347
mov ecx, dword [ebp - 0x54]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x58]
mov dword [ebp - 0x24], ecx
jmp 0x4052f3
mov edx, dword [esi - 0xc]
test eax, eax
js 0x405427
cmp eax, edx
jg 0x405427
movzx eax, word [esi + eax*2]
sub eax, 0x30
cdq
mov dword [ebp - 0x68], eax
mov eax, ecx
mov ecx, dword [ebp - 0x2c]
shld ecx, eax, 2
shl eax, 2
add dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x2c]
adc eax, ecx
mov ecx, dword [ebp - 0x24]
shld eax, ecx, 1
add ecx, ecx
add ecx, dword [ebp - 0x68]
mov dword [ebp - 0x2c], eax
adc edx, eax
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x20], eax
cmp eax, dword [esi - 0xc]
jl 0x4052f0
jmp 0x40534d
mov edx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x58]
add dword [ebp - 0x38], ecx
mov byte [ebp - 4], 3
adc dword [ebp - 0x40], edx
add ebx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [ebx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405371
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x30]
add edx, 0xfffffff0
or ebx, 0xffffffff
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405394
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [esi + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4053b1
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov ecx, ebx
lea eax, [edi + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4053ce
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x60]
mov eax, dword [ecx]
test edi, edi
js 0x405403
cmp edi, dword [eax - 0xc]
jge 0x405403
lea eax, [eax + edi*2]
push 0xa
push eax
call fcn.0054472b
mov esi, eax
add esp, 8
test esi, esi
je 0x405403
mov ecx, dword [ebp - 0x44]
sub esi, dword [ecx]
sar esi, 1
cmp esi, 0xffffffff
jne 0x404e45
mov edi, dword [ebp - 0x38]
mov esi, dword [ebp - 0x40]
xor eax, eax
mov word [ebp - 0x18], ax
mov dword [ebp - 0x16], eax
mov word [ebp - 0x12], ax
mov eax, dword [ebp - 0x28]
cmp dword [eax + 0x98], 0
jg 0x405439
call fcn.00420433
push 0x80070057
call fcn.004021e0
mov esi, dword [ebp - 0x54]
mov edi, dword [ebp - 0x58]
jmp 0x405409
mov eax, dword [eax + 0x94]
push 0
push 0
push 0
lea ecx, [ebp - 0x18]
push ecx
push dword [eax]
call fcn.005442f0
add esp, 0x14
lea eax, [ebp - 0x70]
push 0
push 0
push eax
lea eax, [ebp - 0x18]
push eax
mov dword [ebp - 0x70], 0
mov dword [ebp - 0x6c], 0
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
je 0x405528
cmp esi, dword [ebp - 0x6c]
jb 0x405528
ja 0x40548f
cmp edi, dword [ebp - 0x70]
jbe 0x405528
call fcn.0042125e
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x4054ab
push 0x80004005
call fcn.004021e0
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x20], esi
push 0xb7
mov byte [ebp - 4], 0xd
call fcn.00420ed1
test eax, eax
je 0x4054d9
push 0xb7
push eax
lea ecx, [ebp - 0x20]
call fcn.004034a0
mov esi, dword [ebp - 0x20]
push 0
push 0
push esi
call fcn.0042ceff
add esi, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [esi + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405500
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x4c]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x405521
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
jmp 0x405725
mov edx, dword [ebp - 0x4c]
add edx, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x405722
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x405722
call fcn.0042125e
mov ecx, eax
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x40556e
push 0x80004005
call fcn.004021e0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x44]
xor edi, edi
mov ecx, dword [ecx]
xor ebx, ebx
mov eax, dword [ecx - 0xc]
xor esi, esi
mov dword [ebp - 4], 0xe
mov dword [ebp - 0x30], edi
test eax, eax
jle 0x4056a5
lea esp, [esp]
test esi, esi
js 0x405427
cmp esi, eax
jg 0x405427
movzx edi, word [ecx + esi*2]
mov eax, ebx
sub eax, 0
je 0x405653
dec eax
jne 0x405691
push edi
call fcn.00405dc0
add esp, 4
test eax, eax
je 0x405648
push 0x28
xor ebx, ebx
call fcn.004203ca
add esp, 4
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 0xf
test eax, eax
je 0x405601
mov edi, dword [ebp - 0x30]
push edi
push dword [ebp - 0x1c]
mov ecx, eax
call fcn.00403c30
inc edi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x30], edi
jmp 0x405608
mov dword [ebp - 0x20], 0
mov edi, dword [ebp - 0x28]
push 0
push dword [edi + 0x7c]
lea ecx, [edi + 0x74]
mov byte [ebp - 4], 0xe
call fcn.00405f40
mov ecx, dword [ebp - 0x20]
mov dword [eax + 8], ecx
mov ecx, dword [edi + 0x7c]
test ecx, ecx
je 0x405638
mov dword [ecx], eax
lea ecx, [ebp - 0x1c]
mov dword [edi + 0x7c], eax
call fcn.004022b0
jmp 0x405691
lea ecx, [ebp - 0x1c]
mov dword [edi + 0x78], eax
mov dword [edi + 0x7c], eax
call fcn.004022b0
jmp 0x405691
push edi
lea ecx, [ebp - 0x1c]
call fcn.00404370
jmp 0x405691
push edi
call fcn.00405dc0
add esp, 4
test eax, eax
jne 0x405691
lea ecx, [ebp - 0x64]
mov word [ebp - 0x64], di
mov word [ebp - 0x62], ax
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x405670
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00403740
mov ebx, 1
mov eax, dword [ebp - 0x44]
inc esi
mov ecx, dword [eax]
mov eax, dword [ecx - 0xc]
cmp esi, eax
jl 0x4055a0
mov edi, dword [ebp - 0x30]
dec ebx
jne 0x4056fe
push 0x28
call fcn.004203ca
add esp, 4
mov dword [ebp - 0x60], eax
mov byte [ebp - 4], 0x10
test eax, eax
je 0x4056cc
push edi
push dword [ebp - 0x1c]
mov ecx, eax
call fcn.00403c30
mov edi, eax
jmp 0x4056ce
xor edi, edi
mov esi, dword [ebp - 0x28]
push 0
push dword [esi + 0x7c]
lea ecx, [esi + 0x74]
mov byte [ebp - 4], 0xe
call fcn.00405f40
mov dword [eax + 8], edi
mov ecx, dword [esi + 0x7c]
test ecx, ecx
je 0x4056f0
mov dword [ecx], eax
jmp 0x4056f3
mov dword [esi + 0x78], eax
lea ecx, [ebp - 0x1c]
mov dword [esi + 0x7c], eax
call fcn.004022b0
mov esi, dword [ebp - 0x1c]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x405722
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00543154
mov esp, ebp
pop ebp
ret 4