Function at 0x405a38
Capabilities:
Delete file
Get common file path
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x308
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov byte [esi + 0x1b4], bl
mov byte [esi + 0x1b5], bl
call fcn.00404538
movzx eax, ax
push 0x64
cdq
pop ecx
idiv ecx
cmp edx, 0x40
jge 0x405a6f
mov byte [esi + 0x1b4], 1
cmp byte [esi + 0x1b4], bl
jne 0x405a98
lea eax, [esi + 0x2b7]
push 0x104
push eax
push ebx
mov byte [esi + 0x1b6], bl
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x405c4d
lea eax, [ebp - 0x308]
mov edi, 0x104
push eax
push edi
mov byte [esi + 0x1b6], 1
mov byte [ebp - 0x308], bl
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp byte [ebp - 0x308], bl
je 0x405cb2
lea eax, [esi + 0x2b7]
mov dword [ebp + 8], eax
push eax
mov byte [eax], bl
push ebx
lea eax, [ebp - 0x308]
push 0x420b2c
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
mov eax, dword [ebp + 8]
cmp byte [eax], bl
je 0x405cb2
lea eax, [ebp - 0x308]
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov byte [esi + 0x1b5], bl
call fcn.00404538
movzx eax, ax
push 0x64
cdq
pop ecx
idiv ecx
cmp edx, 0x28
jge 0x405b1d
mov byte [esi + 0x1b5], 1
cmp byte [esi + 0x1b5], bl
jne 0x405b30
lea eax, [esi + 0x1b7]
jmp 0x405c16
lea eax, [esi + 0x184]
push eax
lea eax, [ebp - 0x204]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x204]
push 0x4120ac
push eax
call edi
call fcn.00404538
movzx eax, ax
push 5
cdq
pop ecx
idiv ecx
cmp edx, ebx
je 0x405b7f
jle 0x405b78
cmp edx, 2
jg 0x405b78
push 0x420b28
jmp 0x405b84
push 0x420b24
jmp 0x405b84
push 0x420b20
lea eax, [ebp - 0x204]
push eax
call edi
mov dword [ebp - 4], 0x46
lea eax, [ebp - 0x204]
push 0x41fb00
push eax
call edi
dec dword [ebp - 4]
jne 0x405b94
lea eax, [ebp - 0x204]
push 0x4120ac
push eax
call edi
call fcn.00404538
movzx eax, ax
push 3
cdq
pop ecx
idiv ecx
sub edx, ebx
je 0x405bf4
dec edx
je 0x405bdf
lea eax, [ebp - 0x204]
push 0x420b1c
push eax
call edi
push 0x420b18
jmp 0x405c07
lea eax, [ebp - 0x204]
push 0x420b14
push eax
call edi
push 0x420b10
jmp 0x405c07
lea eax, [ebp - 0x204]
push 0x420b0c
push eax
call edi
push 0x420b08
lea eax, [ebp - 0x204]
push eax
call edi
lea eax, [ebp - 0x204]
push eax
lea eax, [ebp - 0x308]
push dword [ebp + 8]
push eax
call fcn.0040801f
add esp, 0xc
test eax, eax
jne 0x405cb2
lea eax, [esi + 0x184]
push eax
lea eax, [esi + 0x1b7]
push str._s.zip
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push ebx
push 0x80
push 3
push ebx
push 3
push bind
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x405ca1
cmp eax, 0xffffffff
je 0x405ca1
push ebx
push eax
lea edi, [esi + 0x3bc]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [ebp - 4]
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [edi]
cmp edi, 0x400
jl 0x405ca1
cmp edi, 0x4b000
jg 0x405ca1
xor eax, eax
jmp 0x405cb5
cmp byte [esi + 0x1b6], bl
je 0x405cb2
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret