Function at 0x413d80
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44edb8
mov eax, dword fs:[0]
push eax
sub esp, 0x30
mov eax, dword [0x46600c]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x24], ebx
mov eax, dword [ebp + 0x10]
mov esi, 0x100000
cmp dword [ebp + 0xc], esi
mov ecx, dword [ebp + 8]
cmovbe esi, dword [ebp + 0xc]
push 0
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x20]
push eax
push esi
push ecx
push dword [ebx]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, 0x7fffbffb
add ecx, 0x80004005
cmp dword [ebx + 0x1c], 0
je 0x413f86
test ecx, ecx
je 0x413f86
mov edx, dword [ebp - 0x20]
nop dword [eax]
cmp edx, esi
jae 0x413f89
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [ebx]
cmp eax, 0xffffffff
je 0x413e56
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
cmp esi, 0xffffffff
jne 0x413e4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x413e56
mov ecx, dword [ebp - 0x18]
xor eax, eax
add eax, esi
adc ecx, 0
jmp 0x413e64
xorps xmm0, xmm0
movlpd qword [ebp - 0x3c], xmm0
mov ecx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x3c]
push 0
push edi
push ecx
push eax
sub esp, 0x18
lea edi, [ebx + 4]
mov esi, esp
mov dword [ebp - 0x38], esp
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
cmp dword [edi + 0x14], 8
mov ebx, dword [edi + 0x10]
jb 0x413e8d
mov edi, dword [edi]
cmp ebx, 8
jae 0x413ea7
push 0x10
push edi
push esi
call fcn.0043cce0
mov dword [esi + 0x14], 7
jmp 0x413f27
mov eax, ebx
mov ecx, 0x7ffffffe
or eax, 7
cmp eax, 0x7ffffffe
cmova eax, ecx
mov dword [ebp - 0x18], eax
inc eax
lea ecx, [eax + eax]
cmp eax, 0x7fffffff
jbe 0x413ecc
or ecx, 0xffffffff
jmp 0x413ed4
cmp ecx, 0x1000
jb 0x413efd
lea eax, [ecx + 0x23]
cmp eax, ecx
mov ecx, 0xffffffff
cmovbe eax, ecx
push eax
call fcn.0043b783
add esp, 4
test eax, eax
je 0x413fae
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x413f10
test ecx, ecx
je 0x413f0e
push ecx
call fcn.0043b783
add esp, 4
mov ecx, eax
jmp 0x413f10
xor ecx, ecx
lea eax, [ebx*2 + 2]
mov dword [esi], ecx
push eax
push edi
push ecx
call fcn.0043cce0
mov eax, dword [ebp - 0x18]
mov dword [esi + 0x14], eax
mov dword [esi + 0x10], ebx
add esp, 0xc
mov dword [ebp - 4], 0
mov ebx, dword [ebp - 0x24]
mov ecx, dword [ebx + 0x1c]
mov eax, dword [ecx]
mov dword [ebp - 4], 0xffffffff
call dword [eax + 0x18]
mov ecx, eax
test ecx, ecx
jne 0x413f86
mov esi, dword [ebp - 0x28]
push eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x2c]
push esi
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor edx, edx
mov ecx, 0x80004005
test eax, eax
cmovne ecx, edx
mov edx, dword [ebp - 0x20]
add edx, dword [ebp - 0x1c]
mov dword [ebp - 0x20], edx
test eax, eax
je 0x413e10
jmp 0x413f89
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x30]
mov dword [eax], edx
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0043b572
mov esp, ebp
pop ebp
ret 0xc
call fcn.0043f744
int3