Function at 0x410460
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x38
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], 0x415280
mov edx, dword fs:[0]
mov dword [ebp - 0x18], edx
mov dword fs:[0], eax
mov eax, dword [ecx + 0x34]
xor eax, ebx
mov edx, dword [ecx + 0x30]
xor edx, edi
or edx, eax
mov edx, dword [ebp + 0x14]
je 0x4104cd
mov esi, ecx
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x20]
push 0
push eax
push edi
push dword [ecx + 0x28]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4106c7
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], ebx
mov edx, dword [ebp + 0x14]
mov ecx, esi
mov al, 1
test edx, edx
je 0x4107a8
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x24], ecx
add ecx, 8
mov dword [ebp - 0x28], ecx
jmp 0x4104fd
add ebx, edi
mov edx, dword [ebp - 0x2c]
test edx, edx
je 0x4106c0
mov eax, dword [ebp + 0x18]
cmp edx, eax
mov dword [ebp - 0x2c], edx
mov edi, edx
cmova edi, eax
mov dword [ebp - 0x20], 0
push 0
lea eax, [ebp - 0x20]
push eax
push edi
push ebx
mov eax, dword [ebp - 0x24]
push dword [eax + 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410607
cmp dword [ebp - 0x20], edi
jne 0x410540
mov esi, dword [ebp - 0x24]
jmp 0x4105d7
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 4]
mov dword [ebp - 0x10], 0xffffffff
push str.INFO:_Incomplete_write_to__
push eax
call fcn.00401560
add esp, 8
cmp dword [esi + 0x1c], 0xf
mov ecx, dword [ebp - 0x28]
jbe 0x410567
mov ecx, dword [esi + 8]
push dword [esi + 0x18]
push ecx
push eax
call fcn.00407250
add esp, 0xc
push str.__at_offset
push eax
call fcn.00401560
add esp, 8
mov ecx, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00410870
push str..__Expected_to_write
push eax
call fcn.00401560
add esp, 8
mov ecx, eax
push edi
call fcn.004019c0
push str._bytes_and_wrote
push eax
call fcn.00401560
add esp, 8
mov ecx, eax
push dword [ebp - 0x20]
call fcn.004019c0
push str._bytes.
push eax
call fcn.00401560
add esp, 8
push eax
call fcn.00401370
add esp, 4
mov edi, dword [ebp - 0x20]
mov eax, dword [esi + 0x34]
mov ecx, dword [esi + 0x30]
add ecx, edi
adc eax, 0
mov dword [esi + 0x30], ecx
mov dword [esi + 0x34], eax
sub dword [ebp - 0x2c], edi
mov edx, dword [esi + 0x24]
cmp dword [esi + 0x20], ecx
sbb edx, eax
jae 0x4104f0
mov edx, dword [ebp - 0x24]
mov dword [edx + 0x20], ecx
mov dword [edx + 0x24], eax
jmp 0x4104f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 4]
mov dword [ebp - 0x10], 0xffffffff
push str.Could_not_write
push eax
call fcn.00401560
add esp, 8
mov ecx, eax
push edi
call fcn.004019c0
push str._bytes_to__
push eax
call fcn.00401560
add esp, 8
mov ecx, dword [esi + 0x18]
cmp dword [esi + 0x1c], 0xf
jbe 0x41064f
mov edx, dword [esi + 8]
mov dword [ebp - 0x28], edx
push ecx
push dword [ebp - 0x28]
push eax
call fcn.00407250
add esp, 0xc
push str.__at_offset
push eax
call fcn.00401560
add esp, 8
mov ecx, eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00410870
push 0x4f907c
push eax
call fcn.00401560
add esp, 8
mov esi, eax
lea edi, [ebp - 0x44]
push ebx
push edi
call fcn.0040fbf0
add esp, 8
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x30], 0xf
jbe 0x4106a0
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x10], 1
push eax
push edi
push esi
call fcn.00407250
add esp, 0xc
push eax
call fcn.00401370
add esp, 4
jmp 0x410772
mov al, 1
jmp 0x4107a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
push str.Could_not_write
push dword [esi + 4]
call fcn.00401560
add esp, 8
mov ecx, eax
push 0
push dword [ebp + 0x14]
call fcn.00410870
push str._bytes_to__
push eax
call fcn.00401560
add esp, 8
mov ecx, dword [esi + 0x18]
cmp dword [esi + 0x1c], 0xf
jbe 0x410707
mov esi, dword [esi + 8]
jmp 0x41070a
add esi, 8
push ecx
push esi
push eax
call fcn.00407250
add esp, 0xc
push str.__at_offset
push eax
call fcn.00401560
add esp, 8
mov ecx, eax
push dword [ebp + 0xc]
push edi
call fcn.00410870
push 0x4f907c
push eax
call fcn.00401560
add esp, 8
mov esi, eax
lea edi, [ebp - 0x44]
push ebx
push edi
call fcn.0040fbf0
add esp, 8
mov eax, dword [ebp - 0x34]
cmp dword [ebp - 0x30], 0xf
jbe 0x410757
mov edi, dword [ebp - 0x44]
mov dword [ebp - 0x10], 0
push eax
push edi
push esi
call fcn.00407250
add esp, 0xc
push eax
call fcn.00401370
add esp, 4
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jb 0x4107a6
mov ecx, dword [ebp - 0x44]
lea esi, [eax + 1]
cmp esi, 0x1000
jb 0x41079c
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x4107bc
add eax, 0x24
mov esi, eax
mov ecx, edx
push esi
push ecx
call fcn.004a8843
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0x18]
mov dword fs:[0], ecx
add esp, 0x38
pop esi
pop edi
pop ebx
pop ebp
ret 0x14
call fcn.004cc578
nop word cs:[eax + eax]
nop dword [eax + eax]
push ebp
sub esp, 0x14
add ebp, 0xc
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jb 0x41080b
mov ecx, dword [ebp - 0x44]
lea esi, [eax + 1]
cmp esi, 0x1000
jb 0x410801
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x410810
add eax, 0x24
mov esi, eax
mov ecx, edx
push esi
push ecx
call fcn.004a8843
add esp, 8
add esp, 0x14
pop ebp
ret
call fcn.004cc578
nop word cs:[eax + eax]
nop
push ebp
sub esp, 0x14
add ebp, 0xc
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jb 0x41085b
mov ecx, dword [ebp - 0x44]
lea esi, [eax + 1]
cmp esi, 0x1000
jb 0x410851
mov edx, dword [ecx - 4]
add ecx, 0xfffffffc
sub ecx, edx
cmp ecx, 0x20
jae 0x410860
add eax, 0x24
mov esi, eax
mov ecx, edx
push esi
push ecx
call fcn.004a8843
add esp, 8
add esp, 0x14
pop ebp
ret
call fcn.004cc578
int3