Function at 0x402c30
Capabilities:
Check if file exists
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40eca3
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x413090]
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 eax, dword [ebp + 8]
mov esi, ecx
mov dword [ebp - 0x6c], eax
xor ebx, ebx
mov eax, esi
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], ebx
mov byte [ebp - 0x28], bl
lea edi, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402c80
sub eax, edi
push eax
push esi
lea ecx, [ebp - 0x2c]
call fcn.00402000
mov dword [ebp - 4], ebx
push 1
mov esi, 0xf
push 0x410bf8
lea ecx, [ebp - 0x8c]
mov dword [ebp - 0x70], ebx
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x78], ebx
mov byte [ebp - 0x88], bl
call fcn.00402000
mov byte [ebp - 4], 1
push 1
push 0x410c24
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
call fcn.00402000
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x64]
mov edi, 0x10
cmp dword [ebp - 0x50], edi
jae 0x402cec
lea eax, [ebp - 0x64]
mov ecx, dword [ebp - 0x54]
push ecx
push eax
lea edx, [ebp - 0x2c]
push edx
xor eax, eax
call fcn.00403c10
cmp eax, 0xffffffff
je 0x402d1e
mov edx, dword [ebp - 0x54]
lea ecx, [ebp - 0x8c]
push ecx
push edx
mov esi, eax
lea edi, [ebp - 0x2c]
call fcn.004039f0
mov edi, 0x10
lea esi, [edi - 1]
cmp dword [ebp - 0x50], edi
jb 0x402d2f
mov eax, dword [ebp - 0x64]
push eax
call fcn.00404a67
add esp, 4
mov byte [ebp - 4], bl
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
cmp dword [ebp - 0x74], edi
jb 0x402d4f
mov ecx, dword [ebp - 0x88]
push ecx
call fcn.00404a67
add esp, 4
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], edi
jae 0x402d5a
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x402d77
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], edi
jae 0x402d70
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov esi, dword [ebp - 0x28]
cmp dword [ebp - 0x14], edi
jae 0x402d82
lea esi, [ebp - 0x28]
lea edi, [ebp - 0x48]
call fcn.00402880
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x44]
mov edi, 0x10
cmp dword [ebp - 0x30], edi
jae 0x402d9e
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
jne 0x402db9
mov ecx, dword [ebp - 0x44]
cmp dword [ebp - 0x30], edi
jae 0x402db4
lea ecx, [ebp - 0x44]
call fcn.00402940
mov eax, dword [ebp - 0x28]
cmp dword [ebp - 0x14], edi
jae 0x402dc4
lea eax, [ebp - 0x28]
push ebx
push ebx
push 4
push ebx
push 7
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402df5
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x6c]
push ebx
lea edx, [ebp - 0x4c]
push edx
push eax
push ecx
push esi
mov dword [ebp - 0x4c], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x30], edi
jb 0x402e0d
mov edx, dword [ebp - 0x44]
push edx
call fcn.00404a67
add esp, 4
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], ebx
mov byte [ebp - 0x44], bl
cmp dword [ebp - 0x14], edi
jb 0x402e2b
mov eax, dword [ebp - 0x28]
push eax
call fcn.00404a67
add esp, 4
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.0040485c
mov esp, ebp
pop ebp
ret