Function at 0x10027780
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004ec80
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x10063790]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
xor ecx, ecx
cmp dword [esi + 0x50], 0xffffffff
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], ecx
jne 0x100277c5
push 0x10000101
jmp 0x1002799d
mov edi, dword [ebp + 0x10]
cmp edi, ecx
jne 0x100277d6
push 0x10000003
jmp 0x1002799d
mov eax, dword [ebp + 0xc]
cmp eax, ecx
jl 0x10027998
mov ebx, dword [ebp + 8]
jg 0x100277ee
cmp ebx, ecx
jb 0x10027998
cmp eax, dword [esi + 0x24]
jg 0x10027998
jl 0x10027802
cmp ebx, dword [esi + 0x20]
ja 0x10027998
mov eax, dword [esi + 0x38]
imul eax, edi
push eax
mov eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x10027821
push 0x10000004
jmp 0x1002799d
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x38]
xor eax, eax
push eax
push edi
push ecx
push edx
mov dword [ebp - 0x24], eax
call fcn.1003db20
mov edi, eax
add edi, ebx
mov ecx, edx
adc ecx, dword [ebp + 0xc]
cmp ecx, dword [esi + 0x24]
jb 0x10027852
ja 0x10027998
cmp edi, dword [esi + 0x20]
ja 0x10027998
mov edi, edx
push 0
mov ebx, eax
mov dword [ebp - 0x1c], edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push 0
lea eax, [ebp - 0x30]
push eax
mov eax, dword [esi + 0x50]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x1002798f
test edi, edi
jl 0x100278fa
jg 0x10027893
test ebx, ebx
jbe 0x100278fa
jmp 0x10027893
mov edi, dword [ebp - 0x1c]
test edi, edi
jl 0x100278a3
jg 0x1002789e
cmp ebx, 0xffffffff
jbe 0x100278a3
or edi, 0xffffffff
jmp 0x100278a5
mov edi, ebx
mov edx, dword [ebp + 0x14]
mov eax, dword [esi + 0x50]
push 0
lea ecx, [ebp - 0x14]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov dword [ebp - 0x18], eax
je 0x100278e4
mov eax, dword [ebp - 0x14]
test eax, eax
jne 0x100278cd
mov eax, edi
mov dword [ebp - 0x14], eax
sub ebx, eax
mov eax, dword [ebp - 0x1c]
sbb eax, 0
test eax, eax
mov dword [ebp - 0x1c], eax
jg 0x10027890
jl 0x100278fa
test ebx, ebx
ja 0x10027890
jmp 0x100278fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esi + 0x74]
call fcn.1002f510
mov dword [ebp - 0x18], 0
mov ecx, dword [esi + 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
cmp dword [ebp - 0x18], 0
mov dword [ebp - 4], 0xffffffff
je 0x100279a5
mov edx, dword [ebp - 0x24]
mov ebx, dword [ebp + 0x10]
mov eax, dword [esi + 0x3c]
mov ecx, dword [esi + 0x38]
push edx
push ebx
push eax
push ecx
call fcn.1003db20
test edx, edx
ja 0x10027970
cmp eax, 0xffffffff
ja 0x10027970
mov edx, dword [esi + 0x38]
imul edx, ebx
push edx
mov dword [ebp - 4], 2
call fcn.1003bdcc
mov edi, eax
add esp, 4
test edi, edi
mov dword [ebp - 4], 0xffffffff
je 0x10027970
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push edi
push ebx
push eax
push ecx
mov ecx, esi
call fcn.10027590
push edi
call fcn.1003cd42
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
jmp 0x1002799d
push 0x10000002
lea ecx, [esi + 0x74]
call fcn.1002f510
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10