Function at 0x402d30
Capabilities:
Copy file
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, ecx
mov eax, dword [ebx + 4]
mov dword [ebp - 0x10], ebx
cmp eax, 0xffffffff
je 0x402f68
cmp dword [ebx + 0xc], 0
je 0x402f68
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xf4240
jle 0x402f68
push esi
push edi
mov dword [ebp - 0xc], 6
jmp 0x402d74
mov ebx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
push 0xa
lea eax, [ebp - 4]
push eax
push ecx
call fcn.0040c733
mov eax, dword [ebx + 0xc]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402d90
sub eax, edx
mov edx, eax
lea eax, [ebp - 4]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402da1
sub eax, esi
lea edx, [eax + edx + 2]
push edx
call fcn.00404c9b
mov ecx, dword [ebx + 0xc]
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
mov edx, esi
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x402dc1
lea edi, [esi - 1]
mov edi, edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402dd0
mov ax, word [0x40d818]
mov word [edi], ax
lea eax, [ebp - 4]
mov ecx, eax
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x402de6
sub eax, ecx
mov edx, ecx
lea edi, [esi - 1]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402df4
mov ecx, eax
shr ecx, 2
mov esi, edx
mov edx, dword [ebp - 0xc]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0xa
lea ecx, [ebp - 8]
push ecx
inc edx
push edx
call fcn.0040c733
mov eax, dword [ebx + 0xc]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402e25
sub eax, edx
mov edx, eax
lea eax, [ebp - 8]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402e36
sub eax, esi
lea eax, [eax + edx + 2]
push eax
call fcn.00404c9b
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 0xc]
mov ebx, eax
add esp, 4
mov edx, ebx
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x402e56
lea edi, [ebx - 1]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402e63
mov dx, word [0x40d818]
lea eax, [ebp - 8]
mov word [edi], dx
mov esi, eax
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402e80
sub eax, esi
lea edi, [ebx - 1]
lea esp, [esp]
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x402e90
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x14]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push esi
call fcn.00404776
push ebx
call fcn.00404776
mov eax, dword [ebp - 0xc]
dec eax
add esp, 8
mov dword [ebp - 0xc], eax
test eax, eax
jg 0x402d71
mov edi, dword [ebp - 0x10]
mov eax, dword [edi + 0xc]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402ee0
sub eax, edx
add eax, 3
push eax
call fcn.00404c9b
mov ecx, dword [edi + 0xc]
mov esi, eax
add esp, 4
mov edx, esi
lea esp, [esp]
mov al, byte [ecx]
mov byte [edx], al
inc ecx
inc edx
test al, al
jne 0x402f00
lea eax, [esi - 1]
lea ecx, [ecx]
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x402f10
mov cx, word [0x40d814]
mov word [eax], cx
mov dl, byte [0x40d816]
push 0
mov byte [eax + 2], dl
mov eax, dword [edi + 0xc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
push esi
call fcn.00404776
add esp, 4
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [edi + 4]
push 0
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [edi + 4]
push edx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret