Function at 0x40f5b0
Capabilities:
Delete file
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe74
mov eax, 0x511618
push ebx
push esi
push edi
call fcn.004e1410
xor edx, edx
mov dword [ebp - 0x38], edx
push 0
call fcn.004ec530
pop ecx
push eax
call fcn.004e81f4
pop ecx
push 0x51fbb8
call sub.KERNEL32.DLL_SetCurrentDirectoryA
push 0x32
mov ecx, dword [0x54f9fc]
push ecx
call fcn.004126fc
add esp, 8
call fcn.00407198
push 0x2db5e
push 1
call fcn.004dffb4
add esp, 8
mov ebx, eax
test ebx, ebx
jne 0x40f623
mov eax, 0xa
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
jmp 0x40f9bb
mov dl, 1
mov eax, dword [0x419298]
call fcn.00404754
mov esi, eax
mov dword [0x51fcd4], esi
push esi
call fcn.004ef140
pop ecx
push 0x64
mov eax, dword [0x54f9fc]
push eax
call fcn.004126fc
add esp, 8
mov dl, 1
mov eax, dword [0x419298]
call fcn.00404754
mov esi, eax
mov dword [0x51fcd0], esi
push esi
mov eax, dword [0x51fcd4]
push eax
call fcn.004ef36c
add esp, 8
push 0xc8
mov edx, dword [0x54f9fc]
push edx
call fcn.004126fc
add esp, 8
mov ecx, dword [0x51fcd0]
push ecx
call fcn.0040e03c
pop ecx
mov esi, eax
test esi, esi
jne 0x40f6a2
mov edi, 0x1c
jmp 0x40f89c
push 0x12c
mov eax, dword [0x54f9fc]
push eax
call fcn.004126fc
add esp, 8
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp - 0x38]
push ecx
push ebx
call fcn.0040f0fc
add esp, 0xc
mov edi, eax
test edi, edi
jne 0x40f89c
push 0x190
mov eax, dword [0x54f9fc]
push eax
call fcn.004126fc
add esp, 8
push esi
mov edx, dword [0x51fcd0]
push edx
call fcn.0040e2a0
add esp, 8
mov dword [ebp - 0x40], eax
push 0x384
mov ecx, dword [0x54f9fc]
push ecx
call fcn.004126fc
add esp, 8
xor eax, eax
jmp 0x40f77d
lea ecx, [eax + eax*8]
lea ecx, [eax + ecx*8]
lea ecx, [eax + ecx*2]
movzx ecx, byte [edx + ecx*2 + 0xc]
cmp ecx, 2
jl 0x40f77c
lea ecx, [eax + eax*8]
lea ecx, [eax + ecx*8]
lea ecx, [eax + ecx*2]
mov edi, dword [ebx + 1]
movzx ecx, byte [edi + ecx*2 + 0xc]
mov edi, dword [ebp - 0x40]
cmp dword [edi + ecx*4], 0
je 0x40f76b
lea ecx, [eax + eax*8]
lea ecx, [eax + ecx*8]
lea ecx, [eax + ecx*2]
mov edi, dword [ebx + 1]
movzx ecx, byte [edi + ecx*2 + 0xc]
mov edi, dword [ebp - 0x40]
mov ecx, dword [edi + ecx*4]
mov cl, byte [ecx + 0x109]
push ecx
lea ecx, [eax + eax*8]
lea ecx, [eax + ecx*8]
lea ecx, [eax + ecx*2]
lea ecx, [edx + ecx*2 + 0xc]
pop edx
mov byte [ecx], dl
jmp 0x40f77c
lea edx, [eax + eax*8]
lea edx, [eax + edx*8]
lea edx, [eax + edx*2]
mov ecx, dword [ebx + 1]
mov byte [ecx + edx*2 + 0xc], 0
inc eax
mov edx, dword [ebx + 1]
movzx ecx, word [edx + 4]
cmp eax, ecx
jl 0x40f70e
push 0x3e8
mov eax, dword [0x54f9fc]
push eax
call fcn.004126fc
add esp, 8
lea ecx, [ebx + 0x2db4a]
push ecx
mov eax, dword [0x51fcd0]
push eax
call fcn.0040e368
add esp, 8
mov dword [ebx + 0x2db46], eax
push 0x44c
mov edx, dword [0x54f9fc]
push edx
call fcn.004126fc
add esp, 8
mov ecx, dword [ebp - 0x40]
push ecx
call fcn.004e0060
pop ecx
lea eax, [ebx + 0x2db5a]
push eax
mov edx, dword [ebx + 0x2db46]
push edx
call fcn.0040e40c
add esp, 8
mov dword [ebx + 0x2db56], eax
push 0x4b0
mov ecx, dword [0x54f9fc]
push ecx
call fcn.004126fc
add esp, 8
call sub.KERNEL32.DLL_GetSystemDefaultLangID
mov word [ebp - 0x88], ax
mov eax, dword [0x51fcd0]
mov byte [ebp - 0x7b], 0
mov edx, dword [eax + 8]
lea ecx, [ebp - 0x88]
push edx
push esi
push ecx
mov eax, dword [ebp - 0x3c]
push eax
mov edx, dword [ebp - 0x38]
push edx
push ebx
call fcn.00407210
add esp, 0x18
mov edi, eax
push esi
push edi
xor eax, eax
or ecx, 0xffffffff
mov edi, 0x51fbb8
lea esi, [ebp - 0x18c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
xchg edi, esi
shr ecx, 2
mov eax, edi
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
lea ecx, [ebp - 0x18c]
push 0x5115e8
push ecx
call fcn.004e0e48
add esp, 8
mov eax, dword [0x51fcd8]
mov edx, dword [eax + 0x54]
push edx
lea ecx, [ebp - 0x18c]
push ecx
call fcn.004e0e48
add esp, 8
lea eax, [ebp - 0x18c]
push eax
call sub.KERNEL32.DLL_DeleteFileA
push 0x514
mov edx, dword [0x54f9fc]
push edx
call fcn.004126fc
add esp, 8
test edi, edi
je 0x40f976
mov eax, dword [0x54f680]
test eax, eax
je 0x40f8d0
push eax
call fcn.004e0060
pop ecx
xor edx, edx
mov dword [0x54f680], edx
mov eax, dword [0x54f684]
test eax, eax
je 0x40f8e8
push eax
call fcn.004e0060
pop ecx
xor edx, edx
mov dword [0x54f684], edx
mov eax, dword [0x51fcd4]
test eax, eax
je 0x40f92f
push eax
call fcn.004ef224
pop ecx
mov edx, dword [0x51fcd4]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
je 0x40f928
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov dword [ebp - 4], ecx
mov word [ebp - 0x24], 0x24
mov edx, 3
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x24], 0xc
xor eax, eax
mov dword [0x51fcd4], eax
mov eax, dword [0x51fcd0]
test eax, eax
je 0x40f976
push eax
call fcn.004ef254
pop ecx
mov edx, dword [0x51fcd0]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
je 0x40f96f
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx]
mov dword [ebp - 0xc], ecx
mov word [ebp - 0x24], 0x48
mov edx, 3
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
call dword [ecx - 4]
mov word [ebp - 0x24], 0x30
xor eax, eax
mov dword [0x51fcd0], eax
cmp dword [ebp - 0x38], 0
je 0x40f986
mov edx, dword [ebp - 0x38]
push edx
call fcn.004e0060
pop ecx
test esi, esi
je 0x40f991
push esi
call fcn.004e0060
pop ecx
test ebx, ebx
je 0x40f99c
push ebx
call fcn.004e0060
pop ecx
push 0x578
mov eax, dword [0x54f9fc]
push eax
call fcn.004126fc
add esp, 8
mov eax, edi
mov edx, dword [ebp - 0x34]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret