Function at 0x402c17
Capabilities:
Delete file
Get file size
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
and dword [ebp - 0xc], 0
push ebx
mov ebx, eax
lea eax, [ebp - 0xc]
push eax
push ebx
call fcn.00402a7d
test eax, eax
jne 0x40309e
lea eax, [ebx + 0x80]
cmp dword [eax], 0
jbe 0x402c4f
push 4
push eax
push 2
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetSetOptionA]
push esi
push edi
lea eax, [ebp - 0x18]
push eax
lea edi, [ebx + 0x30]
push edi
push ebx
call fcn.00404006
mov esi, eax
test esi, esi
je 0x402c7d
mov ebx, dword [ebx + 4]
test ebx, ebx
je 0x402c76
mov eax, dword [ebx]
push esi
push 0
mov ecx, ebx
call dword [eax + 0x20]
mov ebx, esi
jmp 0x403086
lea ecx, [ebx + 0x28]
push ecx
lea ecx, [ebp - 0x24]
push edi
lea eax, [ebx + 0x2c]
push ecx
call fcn.0040209b
mov esi, dword [ebp - 0x24]
add esp, 0xc
cmp dword [esi - 0xc], 0
jne 0x402cbc
mov eax, 0xe0000005
mov dword [ebx + 0x20], eax
mov ecx, dword [ebx + 4]
test ecx, ecx
je 0x402cb1
mov edx, dword [ecx]
push eax
push 0
call dword [edx + 0x20]
mov ebx, dword [ebx + 0x20]
lea eax, [esi - 0x10]
jmp 0x403081
lea eax, [esi - 0x10]
mov dword [ebp - 0x2c], eax
call fcn.00401c33
push dword [0x438098]
add eax, 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
call fcn.00404612
lea edi, [ebx + 4]
push 1
mov eax, edi
call fcn.00404679
and dword [ebp - 8], 0
cmp byte [ebx + 0x4c], 0
je 0x402cfd
lea eax, [ebp - 0x14]
call fcn.00407d9b
mov dword [ebp - 8], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov eax, ebx
call fcn.00403151
mov dword [ebp - 4], eax
mov eax, edi
call fcn.004046ad
test al, al
je 0x402d27
mov ebx, 0xe0000008
jmp 0x403073
cmp dword [ebp - 4], 0
je 0x402d50
cmp dword [ebp - 4], 0xe0000013
je 0x402d48
mov edi, dword [edi]
test edi, edi
je 0x402d48
push dword [ebp - 4]
mov eax, dword [edi]
push 0
mov ecx, edi
call dword [eax + 0x20]
mov ebx, dword [ebp - 4]
jmp 0x403073
mov eax, dword [ebx + 0x18]
mov ecx, dword [edi]
test ecx, ecx
mov dword [ebp - 0x44], eax
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], ebx
je 0x402d6e
mov eax, dword [ecx]
push esi
push dword [ebp - 0x10]
call dword [eax + 8]
mov eax, edi
call fcn.004046ad
test al, al
je 0x402d91
and dword [ebx + 0x84], 0
lea edi, [ebp - 0x3c]
mov esi, ebx
call fcn.00403da7
xor ebx, ebx
jmp 0x40305f
mov eax, dword [ebp - 0x10]
xor esi, esi
cmp eax, esi
jbe 0x402da8
cmp eax, dword [ebp - 8]
jne 0x402da8
mov eax, edi
call fcn.0040469f
jmp 0x402d79
push esi
push esi
lea eax, [ebp - 0x14]
call fcn.00411f65
cmp eax, esi
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x402ddc
mov edi, dword [edi]
cmp edi, esi
je 0x402dca
mov edx, dword [edi]
push eax
push esi
mov ecx, edi
call dword [edx + 0x20]
lea edi, [ebp - 0x3c]
mov esi, ebx
call fcn.00403da7
mov ebx, dword [ebp - 4]
jmp 0x40305f
xor ecx, ecx
xor eax, eax
cmp ecx, dword [ebp - 8]
push eax
sbb ecx, ecx
neg ecx
push 0x80
inc ecx
inc ecx
push ecx
push eax
push eax
push 0xc0000000
lea esi, [ebp - 0x14]
call fcn.004044e7
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x34], eax
jne 0x402e68
mov eax, edi
call fcn.004046ad
test al, al
je 0x402e35
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [ebp - 0x3c]
mov esi, ebx
call fcn.00403da7
mov ebx, 0xe0000008
jmp 0x40305f
push ebx
call fcn.00404450
mov edi, dword [edi]
test edi, edi
mov dword [ebp - 0x24], eax
je 0x402e4e
mov edx, dword [edi]
push eax
push 0
mov ecx, edi
call dword [edx + 0x20]
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [ebp - 0x3c]
mov esi, ebx
call fcn.00403da7
mov ebx, dword [ebp - 0x24]
jmp 0x40305f
xor eax, eax
cmp dword [ebp - 8], eax
jbe 0x402e88
push 2
push eax
push eax
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 8]
mov eax, edi
call fcn.00404691
jmp 0x402e94
mov ecx, dword [edi]
cmp ecx, eax
je 0x402e94
mov edx, dword [ecx]
push eax
call dword [edx + 0x14]
push 0xc800
call fcn.0042ddf5
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebx + 0x14]
mov eax, ebx
call fcn.004032ec
and dword [ebp - 0x20], 0
mov esi, eax
test esi, esi
jne 0x402eec
cmp dword [ebp - 0x1c], eax
jbe 0x402f73
mov eax, 0xc800
cmp dword [ebp - 0x1c], eax
jae 0x402ed0
mov eax, dword [ebp - 0x1c]
lea ecx, [ebp - 0x20]
push ecx
push eax
push dword [ebp - 8]
mov eax, ebx
push dword [ebx + 0x14]
call fcn.0040324d
mov esi, eax
test esi, esi
je 0x402f6d
cmp esi, 0x2ee2
je 0x402f0c
cmp esi, 0x2efe
je 0x402f0c
cmp esi, 0x2eff
je 0x402f0c
cmp esi, 0x2f83
jne 0x402f36
cmp dword [ebp - 0x18], 3
je 0x402f18
cmp dword [ebp - 0x18], 4
jne 0x402f36
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x34]
lea eax, [ebp - 0x3c]
push dword [ebp - 0xc]
mov ecx, ebx
call fcn.004031d9
mov esi, eax
test esi, esi
je 0x402ea2
cmp esi, 0xe0000008
je 0x402f4e
mov edi, dword [edi]
test edi, edi
je 0x402f4e
mov eax, dword [edi]
push esi
push 0
mov ecx, edi
call dword [eax + 0x20]
push dword [ebp - 8]
call fcn.0042ddfa
cmp dword [ebp - 0x34], 0
pop ecx
je 0x402f66
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, esi
jmp 0x403054
cmp dword [ebp - 0x20], 0
jne 0x402ff1
cmp dword [ebp - 0x10], 0
mov esi, dword [ebp - 0x34]
jbe 0x4030cc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, dword [ebp - 0x10]
jae 0x4030cc
cmp dword [ebp - 0x18], 3
je 0x402fa2
cmp dword [ebp - 0x18], 4
jne 0x4030a1
lea eax, [ebp - 0x10]
push eax
push esi
push dword [ebp - 0xc]
lea eax, [ebp - 0x3c]
mov ecx, ebx
call fcn.004031d9
test eax, eax
mov dword [ebp - 4], eax
je 0x402ea2
cmp eax, 0xe0000008
je 0x402fd8
mov edi, dword [edi]
test edi, edi
je 0x402fd8
push dword [ebp - 4]
mov eax, dword [edi]
push 0
mov ecx, edi
call dword [eax + 0x20]
push dword [ebp - 8]
call fcn.0042ddfa
test esi, esi
pop ecx
je 0x402fec
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [ebp - 4]
jmp 0x403054
xor esi, esi
push esi
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x20]
push dword [ebp - 8]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40311c
push dword [ebp - 0x28]
mov eax, edi
call fcn.00404691
lea eax, [ebx + 0x44]
push eax
mov esi, edi
call fcn.004046c4
mov eax, edi
call fcn.004046ad
test al, al
je 0x402ea2
push dword [ebp - 8]
and dword [ebx + 0x84], 0
call fcn.0042ddfa
cmp dword [ebp - 0x34], 0
pop ecx
je 0x403052
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebx, ebx
mov esi, dword [ebp - 0x38]
lea edi, [ebp - 0x3c]
call fcn.00403da7
push 0
push dword [ebp - 0x44]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0x44]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
call fcn.0040147d
mov eax, dword [ebp - 0x2c]
call fcn.0040147d
push 0
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetSetStatusCallback]
push dword [ebp - 0xc]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
pop edi
mov eax, ebx
pop esi
pop ebx
leave
ret
mov edi, dword [edi]
test edi, edi
mov ebx, 0xe000000f
je 0x4030b6
mov eax, dword [edi]
push ebx
push 0
mov ecx, edi
call dword [eax + 0x20]
push dword [ebp - 8]
call fcn.0042ddfa
test esi, esi
pop ecx
je 0x403054
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x403054
test esi, esi
je 0x4030d9
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push dword [ebp - 0x24]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov eax, edi
call fcn.0040469f
push dword [ebx + 0x68]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push dword [ebp - 8]
and dword [ebx + 0x84], 0
call fcn.0042ddfa
test esi, esi
pop ecx
je 0x403052
push esi
jmp 0x40304c
push ebx
call fcn.00404450
mov dword [ebx + 0x20], eax
mov edi, dword [edi]
cmp edi, esi
je 0x403134
mov edx, dword [edi]
push eax
push esi
mov ecx, edi
call dword [edx + 0x20]
push dword [ebp - 8]
mov ebx, dword [ebx + 0x20]
call fcn.0042ddfa
cmp dword [ebp - 0x34], esi
pop ecx
je 0x403054
push dword [ebp - 0x34]
jmp 0x4030c4