Function at 0x4b1070
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x434c
call fcn.00520250
mov eax, dword [0x58a87c]
xor eax, esp
mov dword [esp + 0x4348], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 0x14]
mov dword [esp + 0x10], edi
cmp ecx, 3
je 0x4b10b0
cmp ecx, 2
je 0x4b10b0
cmp ecx, 1
jne 0x4b1196
mov eax, dword [edi + 4]
cmp ecx, 3
jne 0x4b1179
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x4b1116
cmp eax, 0xffffffff
je 0x4b10cf
mov ecx, dword [edi]
call fcn.004b0a10
mov ecx, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [ecx + 4]
jge 0x4b1196
cmp esi, dword [ecx + 0x10]
jge 0x4b10ed
call fcn.004b0490
mov ecx, dword [edi]
cmp dword [ecx + 0x18], 0
je 0x4b11c6
cmp dword [ecx + 0x10], esi
jge 0x4b110e
nop dword [eax]
mov ecx, dword [edi]
call fcn.004b04d0
mov ecx, dword [edi]
cmp dword [ecx + 0x10], esi
jl 0x4b1100
call fcn.004b0720
mov dword [edi + 4], esi
push dword [ebp + 0x10]
mov ecx, dword [edi]
mov edx, ebx
call fcn.004b0850
mov esi, eax
add esp, 4
test esi, esi
jle 0x4b1147
mov eax, 0x600
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004ef136
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.004b0a10
mov dword [edi + 4], 0xffffffff
test esi, esi
je 0x4b1446
mov eax, 0x5000000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004ef136
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 0xffffffff
je 0x4b1185
mov ecx, dword [edi]
call fcn.004b0a10
mov eax, dword [edi]
mov esi, dword [ebp + 8]
mov dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jl 0x4b11b2
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004ef136
mov esp, ebp
pop ebp
ret 0x10
cmp esi, dword [eax + 0x10]
jge 0x4b11c0
mov ecx, eax
call fcn.004b0490
mov eax, dword [edi]
cmp dword [eax + 0x18], 0
jne 0x4b11e2
mov eax, 0x700
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004ef136
mov esp, ebp
pop ebp
ret 0x10
cmp dword [eax + 0x10], esi
jge 0x4b11f5
mov ecx, dword [edi]
call fcn.004b04d0
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jl 0x4b11e7
lea eax, [esp + 0x18]
mov ecx, edi
push eax
push esi
call fcn.004b0b10
test byte [esp + 0x120], 0x10
jne 0x4b1446
cmp dword [ebp + 0x14], 1
je 0x4b1358
movzx eax, word [ebx]
mov esi, ebx
mov ecx, ebx
test ax, ax
je 0x4b133b
mov edx, eax
nop dword [eax]
cmp dx, 0x2f
je 0x4b123c
cmp dx, 0x5c
jne 0x4b123f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x4b1230
cmp esi, ebx
je 0x4b133b
lea ecx, [esp + 0x148]
mov eax, ebx
mov edi, ecx
mov edx, 0x104
sub eax, edi
mov edi, eax
nop dword [eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x4b128e
movzx eax, word [edi + ecx]
test ax, ax
je 0x4b128e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x4b1270
mov edi, dword [esp + 0x10]
lea eax, [ecx - 2]
test edx, edx
cmovne eax, ecx
sub esi, ebx
sar esi, 1
xor ecx, ecx
mov word [eax], cx
lea esi, [esi*2 - 2]
cmp esi, 0x208
jae 0x4b145f
xor eax, eax
mov word [esp + esi + 0x148], ax
mov ax, word [esp + 0x148]
cmp ax, 0x2f
je 0x4b12e3
cmp ax, 0x5c
je 0x4b12e3
cmp word [esp + 0x14a], 0x3a
mov byte [esp + 0xf], cl
jne 0x4b12e8
mov byte [esp + 0xf], 1
lea eax, [esp + 0x148]
push 0x56280c
push eax
call fcn.004f1101
mov esi, eax
lea eax, [esp + 0x150]
push 0x562814
push eax
call fcn.004f1101
movzx ecx, byte [esp + 0x1f]
add esp, 0x10
test eax, eax
mov eax, 1
setne dl
test esi, esi
cmovne ecx, eax
or dl, cl
jne 0x4b133b
lea ecx, [edi + 0x13c]
lea edx, [esp + 0x148]
call fcn.004b0f40
push 0
push dword [esp + 0x124]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4b1379
mov eax, 0x200
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004ef136
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [edi]
call fcn.004b0720
mov ecx, dword [edi]
lea edx, [esp + 0x350]
push 0x4000
mov byte [esp + 0x13], 0
call fcn.004b0850
add esp, 4
test eax, eax
js 0x4b13d8
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4b13dd
push 0
lea ecx, [esp + 0x14]
push ecx
push eax
lea eax, [esp + 0x35c]
push eax
push ebx
call esi
test eax, eax
je 0x4b13d8
mov ecx, dword [edi]
lea edx, [esp + 0x350]
push 0x4000
call fcn.004b0850
add esp, 4
test eax, eax
jns 0x4b13a5
mov byte [esp + 0xf], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x4b140f
cmp byte [esp + 0xf], 0
jne 0x4b140f
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4b141c
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
call fcn.004b0a10
cmp byte [esp + 0xf], 0
je 0x4b1446
mov eax, 0x400
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x4348]
xor ecx, esp
call fcn.004ef136
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [esp + 0x4354]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004ef136
mov esp, ebp
pop ebp
ret 0x10
call fcn.004ef8c4
int3