Function at 0x41b920
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43ec68
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push esi
push edi
mov eax, dword [0x4620f4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0x10]
mov dword [eax], 0
mov eax, dword [edi - 4]
mov eax, dword [eax + 4]
mov eax, dword [eax + edi]
test eax, eax
je 0x41b96a
cmp dword [eax + 4], 0
jne 0x41bb30
mov ebx, dword [ebp + 0xc]
mov esi, ebx
cmp ebx, dword [edi + 0x10]
mov byte [ebp - 0xd], 0
cmova esi, dword [edi + 0x10]
lea ebx, [ebx]
mov eax, esi
xor edx, edx
div dword [edi + 0xc]
push 0
mov esi, eax
lea eax, [ebp - 0x14]
imul esi, dword [edi + 0xc]
push eax
push esi
push dword [ebp + 8]
push dword [edi + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne case.0x41b9cc.5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x70
ja 0x41b9d3
je case.0x41b9cc.5
sub eax, 5
cmp eax, 0x52
ja case.0x41b9cc.6
movzx eax, byte [eax + 0x41bb4c]
jmp dword [eax*4 + 0x41bb44]
sub eax, 0x45d
je 0x41ba39
sub eax, 0x14d
je 0x41ba39
sub eax, 3
jne case.0x41b9cc.6
cmp dword [ebp - 0x14], eax
jne case.0x41b9cc.6
cmp byte [ebp - 0xd], al
jne 0x41ba3f
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov ebx, eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessWorkingSetSize]
test eax, eax
je 0x41ba36
mov eax, dword [ebp - 0x18]
add eax, esi
push eax
mov eax, dword [ebp - 0x1c]
add eax, esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetProcessWorkingSetSize]
mov ebx, dword [ebp + 0xc]
test eax, eax
je 0x41ba39
mov byte [ebp - 0xd], 1
jmp 0x41b980
mov ebx, dword [ebp + 0xc]
cmp dword [ebp - 0x14], 0
jne case.0x41b9cc.6
mov eax, dword [edi + 0xc]
cmp esi, eax
jbe case.0x41b9cc.6
add esi, eax
shr esi, 1
mov dword [edi + 0x10], esi
jmp 0x41b980
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x41ba6d
mov eax, dword [edi + 0xc]
cmp esi, eax
jbe 0x41bb30
add esi, eax
shr esi, 1
jmp 0x41b980
mov ecx, dword [ebp + 0x10]
sub ebx, eax
mov dword [ebp + 0xc], ebx
add dword [ecx], eax
mov ecx, dword [edi + 0xc]
cmp ebx, ecx
jb 0x41bb30
cmp eax, esi
jne 0x41bb30
add dword [ebp + 8], eax
cmp esi, ebx
jb 0x41b980
lea esi, [ecx + ebx]
shr esi, 1
jmp 0x41b980
push str.Error_occurred_while_writing_the_file.
call fcn.004029e0
add esp, 4
push eax
mov eax, dword [ebp - 0x24]
push 0x40003
push str.WriteFileNoCache
sub esp, 0x18
mov ecx, esp
mov dword [ecx], 0x9fb121ae
mov dword [ecx + 4], 0x7ceb2cdc
mov dword [ecx + 8], 0x44dfa8
mov dword [ecx + 0xc], str.win32_nocache_file::Write
mov dword [ecx + 0x10], 0x205
mov dword [ecx + 0x14], eax
lea eax, [ebp - 0x20]
push eax
call fcn.00416a40
add esp, 0x28
push eax
mov eax, dword [edi - 4]
mov dword [ebp - 4], 0
mov ecx, dword [eax + 4]
add ecx, edi
call fcn.004030c0
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 4], 0xffffffff
test ecx, ecx
je 0x41bb30
or eax, 0xffffffff
lock xadd dword [ecx], eax
jne 0x41bb30
mov eax, dword [ecx + 0xc]
mov esi, dword [ecx + 8]
push ecx
mov eax, dword [eax]
call eax
add esp, 4
mov ecx, esi
test esi, esi
jne 0x41bb13
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc