Function at 0x402060
Capabilities:
Delete file
Get common file path
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x654
mov eax, dword [0x43f1ec]
push ebx
mov ebx, ecx
mov dword [esp + 0x654], eax
mov eax, dword [ebx + 0xc0004]
push esi
lea esi, [ebx + 0xc0004]
mov dword [ebx + 0xbfffc], 0
mov ecx, dword [eax - 0xc]
sub eax, 0x10
push edi
mov edi, dword [eax + 0xc]
mov eax, dword [eax + 8]
mov edx, 1
sub edx, edi
sub eax, ecx
or edx, eax
jge 0x4020b4
push ecx
mov ecx, esi
call fcn.004011b0
mov eax, dword [esi]
lea edx, [esp + 0x340]
sub edx, eax
nop
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4020c0
mov edi, dword [esi]
test edi, edi
jne 0x4020d4
xor eax, eax
jmp 0x4020ef
mov eax, edi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4020e0
sub eax, edx
js 0x402704
cmp eax, dword [edi - 8]
jg 0x402704
mov dword [edi - 0xc], eax
mov ecx, dword [esi]
mov byte [eax + ecx], 0
mov ecx, dword [ebx + 0xbfff4]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x10], eax
jle 0x4026b3
mov dword [esp + 0x14], eax
lea esp, [esp]
mov edx, dword [esp + 0x10]
mov eax, dword [ebx + edx*4]
lea edx, [esp + 0x28]
sub edx, eax
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402130
mov eax, dword [ebx + 0xbfff8]
xor esi, esi
test eax, eax
mov dword [esp + 0xc], esi
jle 0x4021af
lea edi, [ebx + 0x3fffc]
lea eax, [esp + 0x340]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402160
mov ecx, dword [edi]
sub eax, edx
add eax, ecx
lea edx, [esp + 0x448]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x402176
lea edx, [esp + 0x448]
push edx
lea eax, [esp + 0x2c]
push eax
call fcn.0041ec6e
add esp, 8
test eax, eax
je 0x4022a1
mov eax, dword [ebx + 0xbfff8]
inc esi
add edi, 4
cmp esi, eax
jl 0x402150
mov dword [esp + 0xc], esi
xor eax, eax
mov cl, byte [esp + eax + 0x340]
mov byte [esp + eax + 0x130], cl
inc eax
test cl, cl
jne 0x4021b1
lea eax, [esp + 0x28]
mov esi, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4021d0
lea edi, [esp + 0x130]
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4021e1
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [esp + 0x130]
and ecx, 3
push 0x5c
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.00413790
mov edx, eax
lea eax, [esp + 0x138]
mov ecx, 1
sub ecx, eax
add edx, ecx
xor eax, eax
mov ecx, 0x41
lea edi, [esp + 0x240]
push edx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x13c]
push ecx
lea edx, [esp + 0x248]
push edx
call fcn.00413660
add esp, 0x14
lea eax, [esp + 0x550]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
mov edi, dword [sym.imp.kernel32.dll_SetCurrentDirectoryA]
lea ecx, [esp + 0x238]
push ecx
call edi
lea edx, [esp + 0x550]
push edx
mov esi, eax
call edi
test esi, esi
jne 0x402283
lea eax, [esp + 0x238]
push eax
mov ecx, ebx
call fcn.00401a20
push 0x18
call fcn.00421157
add esp, 4
test eax, eax
je 0x4024d3
mov ecx, eax
call fcn.00401d20
jmp 0x4024d5
mov ecx, dword [ebx + esi*4 + 0x3fffc]
mov edx, dword [esp + 0x10]
mov dword [ecx + 0x244], 1
mov ecx, dword [ebx + edx*4]
mov eax, dword [ecx + 0x118]
mov edx, dword [ecx + 0x11c]
mov dword [esp + 0xc], esi
mov esi, dword [ebx + esi*4 + 0x3fffc]
mov ecx, dword [esi + 0x118]
cmp eax, ecx
mov esi, dword [esi + 0x11c]
jne 0x4022e8
cmp edx, esi
je 0x402667
cmp edx, esi
jl 0x4022f8
jg 0x4022f2
cmp eax, ecx
jbe 0x4022f8
sub eax, ecx
sbb edx, esi
jmp 0x402300
sub ecx, eax
sbb esi, edx
mov eax, ecx
mov edx, esi
test edx, edx
jl 0x402667
jg 0x402315
cmp eax, 0x2000000
jbe 0x402667
push 0x18
call fcn.00421157
add esp, 4
test eax, eax
je 0x40232c
mov ecx, eax
call fcn.00401d20
jmp 0x40232e
xor eax, eax
mov edx, dword [ebx + 0xbfffc]
mov dword [ebx + edx*4 + 0x7fff8], eax
lea eax, [esp + 0x28]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402342
mov ecx, dword [ebx + 0xbfffc]
mov ecx, dword [ebx + ecx*4 + 0x7fff8]
sub eax, edx
push eax
lea eax, [esp + 0x2c]
push eax
call fcn.00401d40
mov edx, dword [ebx + 0xbfffc]
mov esi, dword [ebx + edx*4 + 0x7fff8]
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x402429
push 0x431668
push eax
call fcn.004131ce
add esp, 8
test eax, eax
je 0x402429
sub eax, dword [esi]
test eax, eax
mov dword [esp + 0x18], eax
jle 0x402429
mov eax, dword [ebx + 0xbfffc]
mov edi, dword [ebx + eax*4 + 0x7fff8]
mov eax, dword [edi]
mov esi, dword [eax - 0xc]
cmp dword [esp + 0x18], esi
jge 0x402704
cmp dword [eax - 4], 1
jle 0x4023cd
mov ecx, esi
push ecx
mov ecx, edi
call fcn.00401080
test esi, esi
mov edx, dword [edi]
mov eax, dword [esp + 0x18]
mov byte [eax + edx], 0x2f
jl 0x402704
mov eax, dword [edi]
cmp esi, dword [eax - 8]
jg 0x402704
mov dword [eax - 0xc], esi
mov ecx, dword [edi]
mov byte [esi + ecx], 0
mov edx, dword [ebx + 0xbfffc]
mov esi, dword [ebx + edx*4 + 0x7fff8]
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x402429
push 0x431668
push eax
call fcn.004131ce
add esp, 8
test eax, eax
je 0x402429
sub eax, dword [esi]
test eax, eax
mov dword [esp + 0x18], eax
jg 0x4023a1
mov esi, dword [esp + 0xc]
mov eax, dword [ebx + esi*4 + 0x3fffc]
push 0x80
push eax
call dword [sym.imp.kernel32.dll_SetFileAttributesA]
mov edi, dword [ebx + esi*4 + 0x3fffc]
mov ecx, dword [ebx + 0xbfffc]
mov esi, dword [ebx + ecx*4 + 0x7fff8]
add esi, 4
test edi, edi
jne 0x40245f
xor eax, eax
jmp 0x40246d
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402464
sub eax, edx
push eax
push edi
mov ecx, esi
call fcn.00401d40
mov eax, dword [esp + 0x10]
mov edx, dword [ebx + eax*4]
mov esi, dword [edx + 0x118]
mov ecx, dword [ebx + 0xbfffc]
mov ecx, dword [ebx + ecx*4 + 0x7fff8]
mov dword [ecx + 8], esi
mov edx, dword [edx + 0x11c]
mov dword [ecx + 0xc], edx
mov ecx, dword [ebx + eax*4]
mov edx, dword [ebx + 0xbfffc]
mov edx, dword [ebx + edx*4 + 0x7fff8]
mov ecx, dword [ecx + 0x120]
mov dword [edx + 0x10], ecx
mov edx, dword [ebx + eax*4]
mov eax, dword [ebx + 0xbfffc]
mov ecx, dword [ebx + eax*4 + 0x7fff8]
mov edx, dword [edx + 0x124]
mov dword [ecx + 0x14], edx
jmp 0x402661
xor eax, eax
mov ecx, dword [ebx + 0xbfffc]
mov dword [ebx + ecx*4 + 0x7fff8], eax
lea eax, [esp + 0x28]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4024f0
sub eax, edx
push eax
mov eax, dword [ebx + 0xbfffc]
mov ecx, dword [ebx + eax*4 + 0x7fff8]
lea edx, [esp + 0x2c]
push edx
call fcn.00401d40
mov ecx, dword [ebx + 0xbfffc]
mov esi, dword [ebx + ecx*4 + 0x7fff8]
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x4025d8
push 0x431668
push eax
call fcn.004131ce
add esp, 8
test eax, eax
je 0x4025d8
sub eax, dword [esi]
test eax, eax
mov dword [esp + 0xc], eax
jle 0x4025d8
nop
mov edx, dword [ebx + 0xbfffc]
mov edi, dword [ebx + edx*4 + 0x7fff8]
mov eax, dword [edi]
mov esi, dword [eax - 0xc]
cmp dword [esp + 0xc], esi
jge 0x402704
cmp dword [eax - 4], 1
jle 0x40257c
mov eax, esi
push eax
mov ecx, edi
call fcn.00401080
test esi, esi
mov ecx, dword [edi]
mov edx, dword [esp + 0xc]
mov byte [edx + ecx], 0x2f
jl 0x402704
mov eax, dword [edi]
cmp esi, dword [eax - 8]
jg 0x402704
mov dword [eax - 0xc], esi
mov eax, dword [edi]
mov byte [esi + eax], 0
mov ecx, dword [ebx + 0xbfffc]
mov esi, dword [ebx + ecx*4 + 0x7fff8]
mov eax, dword [esi]
mov ecx, dword [eax - 0xc]
test ecx, ecx
jl 0x4025d8
push 0x431668
push eax
call fcn.004131ce
add esp, 8
test eax, eax
je 0x4025d8
sub eax, dword [esi]
test eax, eax
mov dword [esp + 0xc], eax
jg 0x402550
lea eax, [esp + 0x130]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4025e2
sub eax, edx
push eax
mov eax, dword [ebx + 0xbfffc]
mov ecx, dword [ebx + eax*4 + 0x7fff8]
lea edx, [esp + 0x134]
push edx
add ecx, 4
call fcn.00401d40
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + eax*4]
mov esi, dword [ecx + 0x118]
mov edx, dword [ebx + 0xbfffc]
mov edx, dword [ebx + edx*4 + 0x7fff8]
mov dword [edx + 8], esi
mov ecx, dword [ecx + 0x11c]
mov dword [edx + 0xc], ecx
mov edx, dword [ebx + eax*4]
mov ecx, dword [ebx + 0xbfffc]
mov ecx, dword [ebx + ecx*4 + 0x7fff8]
mov edx, dword [edx + 0x120]
mov dword [ecx + 0x10], edx
mov eax, dword [ebx + eax*4]
mov ecx, dword [ebx + 0xbfffc]
mov edx, dword [ebx + ecx*4 + 0x7fff8]
mov eax, dword [eax + 0x124]
mov dword [edx + 0x14], eax
inc dword [ebx + 0xbfffc]
mov eax, dword [esp + 0x14]
cdq
idiv dword [ebx + 0xbfff4]
cmp eax, 0x64
mov dword [ebx + 0xc0008], eax
jge 0x402691
push eax
lea ecx, [esp + 0x20]
push 0x431680
push ecx
call dword [sym.imp.user32.dll_wsprintfA]
add esp, 0xc
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ecx, dword [ebx + 0xbfff4]
inc eax
add edx, 0x64
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
jl 0x402120
mov eax, dword [ebx + 0xc000c]
test eax, eax
je 0x4026f1
mov eax, dword [ebx + 0xbfff8]
xor edi, edi
test eax, eax
jle 0x4026f1
lea esi, [ebx + 0x3fffc]
nop
mov eax, dword [esi]
mov ecx, dword [eax + 0x244]
test ecx, ecx
jne 0x4026e3
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov eax, dword [ebx + 0xbfff8]
inc edi
add esi, 4
cmp edi, eax
jl 0x4026d0
mov ecx, dword [esp + 0x65c]
call fcn.004130e9
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00401000
int3