Function at 0x402800
Capabilities:
Copy file
Get file size
Read file on windows

Disassembly:
mov eax, 0x502f4
call fcn.00402da0
push ebx
push esi
push edi
mov ecx, 0x13fff
xor eax, eax
lea edi, [esp + 0x301]
mov byte [esp + 0x300], 0
xor ebx, ebx
rep stosd dword es:[edi], eax
push ebx
push 0x80
push 3
push ebx
stosw word es:[edi], ax
mov eax, dword [esp + 0x50324]
push ebx
push 0x80000000
push eax
mov byte [esp + 0x2c], 0
mov word [esp + 0x2d], bx
mov byte [esp + 0x28], bl
mov word [esp + 0x29], bx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x402b94
lea ecx, [esp + 0x34]
push ecx
push edi
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov esi, eax
cmp esi, 0x4ffff
ja 0x402b8d
cmp esi, 0xffffffff
je 0x402b8d
push ebp
lea edx, [esp + 0x38]
push ebx
push edx
lea eax, [esp + 0x30c]
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.DLL_ReadFile]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov al, byte [esp + esi + 0x3e]
mov dl, byte [esp + esi + 0x3d]
mov cl, byte [esp + esi + 0x3c]
mov byte [esp + 0x10], al
lea eax, [esp + esi + 0x40]
mov byte [esp + 0x15], dl
mov dword [esp + 0x3c], eax
mov byte [esp + 0x14], cl
mov dl, byte [eax]
mov al, byte [esp + esi + 0x42]
mov cl, byte [esp + esi + 0x3f]
mov byte [esp + 0x18], al
mov edi, dword [esp + 0x18]
lea eax, [esp + esi + 0x34]
mov byte [esp + 0x11], cl
mov cl, byte [esp + esi + 0x35]
mov byte [esp + 0x1c], dl
mov dl, byte [eax]
push edi
push ecx
push edx
mov dword [esp + 0x4c], eax
call fcn.00402230
mov ebx, eax
mov al, byte [esp + esi + 0x4f]
add esp, 0xc
cmp al, 0xf1
mov dword [esp + 0x18], ebx
jne 0x402918
mov al, byte [esp + esi + 0x37]
mov cl, byte [esp + esi + 0x36]
push edi
push eax
push ecx
call fcn.00402230
jmp 0x402928
mov dl, byte [esp + esi + 0x37]
mov cl, byte [esp + esi + 0x36]
push edx
push ecx
push eax
call fcn.004021b0
mov dl, byte [esp + esi + 0x45]
add esp, 0xc
mov ebp, eax
mov al, byte [esp + esi + 0x38]
push edi
push edx
push eax
call fcn.00402230
mov cl, byte [esp + esi + 0x47]
mov dl, byte [esp + esi + 0x46]
push edi
push ecx
push edx
mov dword [esp + 0x4c], eax
call fcn.00402230
mov ecx, dword [esp + 0x50324]
lea ebx, [esp + ebx + 0x31c]
push 0
push ebp
lea eax, [esp + 0x34]
push ebx
push eax
push ecx
call fcn.00402260
mov edx, dword [esp + 0x44]
mov edi, dword [esp + 0x60]
add esp, 0x2c
add ebp, edx
test edi, edi
jbe 0x4029a1
mov edx, dword [esp + 0x50310]
push 0
lea eax, [esp + ebp + 0x308]
push edi
lea ecx, [esp + 0x18]
push eax
push ecx
push edx
call fcn.00402260
add esp, 0x14
add ebp, edi
xor eax, eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x22], eax
push ecx
mov dword [esp + 0x2a], eax
mov word [esp + 0x24], 0
mov dword [esp + 0x2e], eax
mov word [esp + 0x32], ax
call dword [sym.imp.KERNEL32.DLL_GetLocalTime]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x22]
mov ecx, dword [esp + 0x20]
and eax, 0xffff
and edx, 0xffff
and ecx, 0xffff
add eax, edx
add eax, ecx
lea eax, [eax + eax*4]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x2e]
and eax, 0xffff
lea ecx, [eax + edx*4]
mov edx, dword [esp + 0x2a]
mov eax, dword [esp + 0x26]
and edx, 0xffff
add ecx, edx
and eax, 0xffff
lea ecx, [ecx + eax + 0xa]
push ecx
call fcn.00402d70
mov ecx, 0xaf
xor eax, eax
lea edi, [esp + 0x49]
mov byte [esp + 0x48], 0
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x20]
lea ecx, [esp + 0x48]
stosw word es:[edi], ax
stosb byte es:[edi], al
push edx
lea eax, [esp + ebp + 0x31c]
push 0x2c0
push eax
push ecx
call fcn.00402200
add esp, 0x14
push 0x2c1
push 8
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov ebp, eax
xor edi, edi
call fcn.00402d7a
and eax, 0x8000000f
jns 0x402a75
dec eax
or eax, 0xfffffff0
inc eax
mov edx, dword [str.0123456789ABCDEF]
inc edi
cmp edi, 0x20
mov al, byte [eax + edx]
mov byte [esp + edi + 0x43], al
jl 0x402a64
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x2a]
mov eax, dword [esp + 0x28]
and ecx, 0xffff
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x2a]
and eax, 0xffff
push edx
mov edx, dword [esp + 0x2a]
push eax
mov eax, dword [esp + 0x2c]
and ecx, 0xffff
and edx, 0xffff
push ecx
and eax, 0xffff
push edx
push eax
lea ecx, [esp + 0xbc]
push str._d__d__d__d:_d:_d
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov al, byte [ebp]
add esp, 0x20
test al, al
jne 0x402b1e
lea esi, [esp + esi + 0x41]
call fcn.004021e0
mov edx, dword [esp + 0x3c]
mov byte [esp + 0x1c], al
mov byte [edx], al
call fcn.004021e0
mov byte [esi], al
mov eax, dword [esp + 0x1c]
push eax
lea ecx, [esp + 0x48]
push 0x2c0
push ecx
push ebp
call fcn.00402200
mov al, byte [ebp]
add esp, 0x10
test al, al
je 0x402ae9
mov eax, dword [esp + 0x40]
mov esi, ebp
push ebp
push 0
mov edx, dword [eax]
mov dword [ebx], edx
mov ecx, dword [eax + 4]
mov dword [ebx + 4], ecx
mov edx, dword [eax + 8]
mov ecx, dword [esp + 0x20]
mov dword [ebx + 8], edx
mov eax, dword [eax + 0xc]
lea edi, [esp + ecx + 0x31c]
mov ecx, 0xb0
mov dword [ebx + 0xc], eax
rep movsd dword es:[edi], dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov esi, dword [esp + 0x50308]
mov edx, dword [esp + 0x50318]
push 0
push esi
push edx
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
push esi
call fcn.00402020
add esp, 4
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x502f4
ret
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x502f4
ret