Function at 0x4d5830
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d99d1
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x65b4e4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x134], ecx
mov ecx, dword [ebp - 0x134]
add ecx, 4
call fcn.0040bf30
push eax
call fcn.00519e80
add esp, 4
test eax, eax
je 0x4d592d
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x58], 0
lea eax, [ebp - 0x5c]
push eax
mov ecx, dword [ebp - 0x134]
add ecx, 4
call fcn.0040bf30
push eax
call fcn.0051b730
add esp, 8
push 0x60ebe0
mov ecx, dword [ebp - 0x134]
add ecx, 4
push ecx
lea edx, [ebp - 0x4c]
push edx
call fcn.00404a40
add esp, 0xc
mov dword [ebp - 4], 0
mov dword [ebp - 0x54], 0x100000
mov dword [ebp - 0x50], 0
mov eax, dword [ebp - 0x58]
cmp eax, dword [ebp - 0x50]
jb 0x4d591e
ja 0x4d58eb
mov ecx, dword [ebp - 0x5c]
cmp ecx, dword [ebp - 0x54]
jb 0x4d591e
lea ecx, [ebp - 0x4c]
call fcn.0040bf30
push eax
call fcn.00503060
add esp, 4
push 0
lea ecx, [ebp - 0x4c]
call fcn.0040bf30
push eax
mov ecx, dword [ebp - 0x134]
add ecx, 4
call fcn.0040bf30
push eax
call fcn.004fe150
add esp, 0xc
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x4c]
call fcn.0040c050
mov edx, dword [ebp + 8]
push edx
lea ecx, [ebp - 0x30]
call fcn.0040bf50
mov dword [ebp - 4], 1
push 0x60ebe8
mov ecx, dword [ebp - 0x134]
add ecx, 4
call fcn.0040bf30
push eax
call fcn.005b0ac9
add esp, 8
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4d5aca
lea eax, [ebp - 0xf8]
push eax
call fcn.004fffc0
add esp, 4
mov dword [ebp - 0x138], eax
mov ecx, dword [ebp - 0x138]
mov dword [ebp - 0x13c], ecx
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x13c]
call fcn.0040bf30
push eax
call sub.KERNEL32.dll_GetCurrentThreadId
push eax
push 0x60ebec
push 0x80
lea edx, [ebp - 0xdc]
push edx
call fcn.005b0ba7
add esp, 0x14
mov byte [ebp - 4], 1
lea ecx, [ebp - 0xf8]
call fcn.0040c050
lea eax, [ebp - 0xdc]
mov dword [ebp - 0x140], eax
mov ecx, dword [ebp - 0x140]
add ecx, 1
mov dword [ebp - 0x144], ecx
mov edx, dword [ebp - 0x140]
mov al, byte [edx]
mov byte [ebp - 0x145], al
add dword [ebp - 0x140], 1
cmp byte [ebp - 0x145], 0
jne 0x4d59e3
mov ecx, dword [ebp - 0x140]
sub ecx, dword [ebp - 0x144]
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x10]
push edx
push 1
mov eax, dword [ebp - 0x14c]
push eax
lea ecx, [ebp - 0xdc]
push ecx
call fcn.005b0d41
add esp, 0x10
push 0x60ec04
lea ecx, [ebp - 0x114]
call fcn.0040bf50
mov byte [ebp - 4], 3
push 0x60ec08
lea ecx, [ebp - 0x130]
call fcn.0040bf50
mov byte [ebp - 4], 4
lea edx, [ebp - 0x114]
push edx
lea eax, [ebp - 0x130]
push eax
lea ecx, [ebp - 0x30]
push ecx
call fcn.004fb430
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x130]
call fcn.0040c050
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x114]
call fcn.0040c050
lea ecx, [ebp - 0x30]
call fcn.0040bf30
push eax
push 0x60ec0c
mov edx, dword [ebp - 0x10]
push edx
call fcn.005b0dc3
add esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
push 1
push 2
push 0x60ec10
call fcn.005b0d41
add esp, 0x10
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.005b0f84
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x30]
call fcn.0040c050
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005b0968
mov esp, ebp
pop ebp
ret 4