Function at 0x10055980
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, edx
mov dword [ebp - 4], eax
push 0
mov eax, dword [ebp - 4]
movzx eax, word [eax + 0x2050]
push eax
push 2
push 0
push 2
push 0x40000000
mov eax, esi
call fcn.10004a00
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
mov eax, dword [ebp - 4]
mov dword [eax + 0x1c], ebx
test ebx, ebx
je 0x10055c37
xor eax, eax
push ebp
push 0x10055c30
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2048]
push eax
push 0xe1
push 0
push 9
mov eax, dword [ebp - 4]
add eax, 4
push eax
call fcn.10052db8
mov eax, dword [ebp - 4]
mov dword [eax + 0x20], 0
mov dword [eax + 0x24], 0
mov eax, dword [ebp - 4]
cmp dword [eax + 0x2044], 0
jne 0x10055a20
cmp dword [eax + 0x2040], 0x2000
jbe 0x10055ba1
jmp 0x10055a26
jle 0x10055ba1
push 0
push 0x2000
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2044]
mov eax, dword [eax + 0x2040]
call fcn.100055c4
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x2028], eax
mov dword [ecx + 0x202c], edx
mov eax, dword [ebp - 4]
lea edx, [eax + 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov ecx, 0x2000
call fcn.1004d594
mov ebx, eax
test ebx, ebx
jg 0x10055a7e
mov eax, dword [ebp - 4]
mov dword [eax + 0x2054], 0xffffffff
jmp 0x10055b0e
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
push eax
call sub.KERNEL32.DLL_SetFilePointer
push 0
mov eax, dword [ebp - 4]
add eax, 0x2030
push eax
push ebx
mov eax, dword [ebp - 4]
add eax, 0x28
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2030]
xor edx, edx
mov ecx, dword [ebp - 4]
add dword [ecx + 0x20], eax
adc dword [ecx + 0x24], edx
push 1
call sub.KERNEL32.DLL_Sleep
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x2044]
mov eax, dword [eax + 0x2040]
mov ecx, dword [ebp - 4]
sub eax, dword [ecx + 0x2028]
sbb edx, dword [ecx + 0x202c]
mov ecx, dword [ebp - 4]
cmp edx, dword [ecx + 0x24]
jne 0x10055afc
cmp eax, dword [ecx + 0x20]
jbe 0x10055b0e
jmp 0x10055afe
jle 0x10055b0e
mov eax, dword [ebp - 4]
cmp dword [eax + 0x2054], 0
je 0x10055a50
mov eax, dword [ebp - 4]
cmp dword [eax + 0x202c], 0
jne 0x10055b29
cmp dword [eax + 0x2028], 0
jbe 0x10055c00
jmp 0x10055b2f
jle 0x10055c00
mov eax, dword [ebp - 4]
cmp dword [eax + 0x2054], 0
jne 0x10055c00
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2028]
mov eax, dword [ebp - 4]
lea edx, [eax + 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.1004d594
mov ebx, eax
test ebx, ebx
jg 0x10055b69
call fcn.10003f70
jmp 0x10055c37
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x20]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
push eax
call sub.KERNEL32.DLL_SetFilePointer
push 0
mov eax, dword [ebp - 4]
add eax, 0x2030
push eax
push ebx
mov eax, dword [ebp - 4]
add eax, 0x28
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
jmp 0x10055c00
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x2040]
mov eax, dword [ebp - 4]
lea edx, [eax + 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
call fcn.1004d594
test eax, eax
jg 0x10055bc6
call fcn.10003f70
jmp 0x10055c37
push 0
push 0
push 0
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
push eax
call sub.KERNEL32.DLL_SetFilePointer
push 0
mov eax, dword [ebp - 4]
add eax, 0x2030
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x2040]
push eax
mov eax, dword [ebp - 4]
add eax, 0x28
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
push eax
call sub.KERNEL32.DLL_WriteFile_1
mov eax, dword [ebp - 4]
lea edx, [eax + 0x28]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov ecx, 1
call fcn.1004d600
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x10055c37
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
push eax
call sub.KERNEL32.DLL_CloseHandle
ret
pop esi
pop ebx
pop ecx
pop ebp
ret