Function at 0x4b17de
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x5520a0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x14], 3
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
je 0x4b1abf
cmp dword [ebp + 0x14], 2
je 0x4b1819
cmp dword [ebp + 0x14], 1
je 0x4b1819
mov eax, 0x10000
jmp 0x4b1b60
cmp dword [edi + 4], 0xffffffff
je 0x4b1827
push dword [edi]
call fcn.004b413a
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jge 0x4b180f
cmp ebx, dword [eax + 0x10]
jge 0x4b184a
push eax
call fcn.004b42d6
jmp 0x4b1849
push dword [edi]
call fcn.004b4315
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x4b1842
lea eax, [ebp - 0x644]
mov ecx, edi
push eax
push ebx
call fcn.004b1041
mov eax, dword [ebp - 0x438]
shr eax, 4
test al, 1
je 0x4b18a9
cmp dword [ebp + 0x14], 1
je 0x4b1b41
movzx eax, word [esi]
cmp eax, 0x2f
je 0x4b189a
cmp eax, 0x5c
je 0x4b189a
test ax, ax
je 0x4b1890
cmp word [esi + 2], 0x3a
je 0x4b189a
push esi
lea eax, [edi + 0x244]
push eax
jmp 0x4b189d
push esi
push 0
call fcn.004b0bc7
pop ecx
pop ecx
jmp 0x4b1b41
xor eax, eax
xor ebx, ebx
cmp dword [ebp + 0x14], 1
mov word [ebp - 0x414], ax
je 0x4b19e0
movzx eax, word [esi]
mov ecx, esi
push 0x5c
mov dword [ebp - 0x650], esi
mov dword [ebp - 0x64c], 0x2f
pop edx
jmp 0x4b18f5
cmp ax, word [ebp - 0x64c]
je 0x4b18e6
cmp ax, dx
jne 0x4b18ef
lea eax, [ecx + 2]
mov dword [ebp - 0x650], eax
add ecx, 2
movzx eax, word [ecx]
test ax, ax
jne 0x4b18d8
push 0x104
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.004d3cdc
mov ecx, dword [ebp - 0x650]
add esp, 0xc
cmp ecx, esi
jne 0x4b1924
xor eax, eax
mov word [ebp - 0x20c], ax
jmp 0x4b1966
mov eax, ecx
sub eax, esi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x4b1b73
xor edx, edx
mov word [ebp + eax - 0x20c], dx
mov ax, word [ebp - 0x20c]
push 0x2f
pop edx
cmp ax, dx
je 0x4b1998
push 0x5c
pop edx
cmp ax, dx
je 0x4b1998
test ax, ax
je 0x4b1966
cmp word [ebp - 0x20a], 0x3a
je 0x4b1998
push ecx
lea eax, [ebp - 0x20c]
push eax
lea esi, [edi + 0x244]
push esi
lea eax, [ebp - 0x414]
push str._s_s_s
push eax
call fcn.004ab157
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.004b0bc7
add esp, 0x1c
jmp 0x4b19c1
push ecx
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push 0x52a4d8
push eax
call fcn.004ab157
lea eax, [ebp - 0x20c]
push eax
push ebx
call fcn.004b0bc7
add esp, 0x18
push ebx
push dword [ebp - 0x438]
lea eax, [ebp - 0x414]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4b19ef
mov eax, 0x200
jmp 0x4b1b60
push dword [edi + 0x23c]
push dword [edi]
call fcn.004b4422
pop ecx
pop ecx
cmp dword [edi + 0x240], ebx
jne 0x4b1a17
push 0x4000
call fcn.004d1376
pop ecx
mov dword [edi + 0x240], eax
lea eax, [ebp - 0x645]
push eax
push 0x4000
push dword [edi + 0x240]
push dword [edi]
call fcn.004b4715
add esp, 0x10
mov dword [ebp - 0x64c], eax
cmp eax, 0xffffff96
je 0x4b1a7e
test eax, eax
js 0x4b1a70
jle 0x4b1a64
push ebx
lea ecx, [ebp - 0x650]
push ecx
push eax
push dword [edi + 0x240]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4b1a77
mov eax, dword [ebp - 0x64c]
cmp byte [ebp - 0x645], bl
jne 0x4b1a83
test eax, eax
jne 0x4b1a17
mov ebx, 0x5000000
jmp 0x4b1a83
mov ebx, 0x400
jmp 0x4b1a83
mov ebx, 0x1000
push dword [edi]
call fcn.004b413a
pop ecx
test ebx, ebx
jne 0x4b1aab
lea eax, [ebp - 0x424]
push eax
lea eax, [ebp - 0x434]
push eax
lea eax, [ebp - 0x42c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x4b1ab8
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
jmp 0x4b1b60
mov ebx, dword [ebp + 8]
cmp ebx, dword [edi + 4]
je 0x4b1b11
cmp dword [edi + 4], 0xffffffff
je 0x4b1ad5
push dword [edi]
call fcn.004b413a
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jge 0x4b180f
cmp ebx, dword [eax + 0x10]
jge 0x4b1af9
push eax
call fcn.004b42d6
jmp 0x4b1af8
push dword [edi]
call fcn.004b4315
pop ecx
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x4b1af1
push dword [edi + 0x23c]
push eax
call fcn.004b4422
pop ecx
pop ecx
mov dword [edi + 4], ebx
lea eax, [ebp - 0x645]
push eax
push dword [ebp + 0x10]
push esi
push dword [edi]
call fcn.004b4715
mov esi, eax
add esp, 0x10
test esi, esi
jg 0x4b1b38
push dword [edi]
call fcn.004b413a
or dword [edi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x645], 0
je 0x4b1b45
xor eax, eax
jmp 0x4b1b60
test esi, esi
jle 0x4b1b50
mov eax, 0x600
jmp 0x4b1b60
cmp esi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d11b3
mov esp, ebp
pop ebp
ret 0x10
call fcn.004d3955
int3