Function at 0x50b4d0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x433c
call fcn.0051e250
push ebx
mov ebx, dword [esp + 0x4350]
push ebp
push esi
cmp ebx, 3
push edi
mov esi, ecx
je 0x50b510
cmp ebx, 2
je 0x50b5de
cmp ebx, 1
je 0x50b5de
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x433c
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x4350]
cmp edi, eax
je 0x50b581
cmp eax, 0xffffffff
je 0x50b52e
mov eax, dword [esi]
push eax
call fcn.0050ade0
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jl 0x50b54e
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x433c
ret 0x10
cmp edi, dword [eax + 0x10]
jge 0x50b55c
push eax
call fcn.0050a800
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x50b573
push eax
call fcn.0050a850
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x50b563
mov ecx, dword [esi]
push ecx
call fcn.0050aad0
add esp, 4
mov dword [esi + 4], edi
mov edx, dword [esp + 0x4358]
mov eax, dword [esp + 0x4354]
mov ecx, dword [esi]
push edx
push eax
push ecx
call fcn.0050ac00
mov edi, eax
add esp, 0xc
test edi, edi
jle 0x50b5b4
pop edi
pop esi
pop ebp
mov eax, 0x600
pop ebx
add esp, 0x433c
ret 0x10
mov edx, dword [esi]
push edx
call fcn.0050ade0
add esp, 4
mov eax, edi
neg eax
mov dword [esi + 4], 0xffffffff
pop edi
sbb eax, eax
pop esi
pop ebp
and eax, 0x5000000
pop ebx
add esp, 0x433c
ret 0x10
mov eax, dword [esi + 4]
or edi, 0xffffffff
cmp eax, edi
je 0x50b5f3
mov eax, dword [esi]
push eax
call fcn.0050ade0
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x4350]
cmp edi, dword [eax + 4]
jl 0x50b616
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x433c
ret 0x10
cmp edi, dword [eax + 0x10]
jge 0x50b624
push eax
call fcn.0050a800
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x50b63b
push eax
call fcn.0050a850
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x50b62b
lea ecx, [esp + 0x18]
push ecx
push edi
mov ecx, esi
call fcn.0050afb0
test byte [esp + 0x120], 0x10
je 0x50b6a3
cmp ebx, 1
jne 0x50b666
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x433c
ret 0x10
lea edx, [esp + 0x144]
push 0x103
lea eax, [esp + 0x20]
push edx
push eax
call fcn.0050b8a0
lea ecx, [esp + 0x150]
add esi, 0x138
push ecx
push esi
call fcn.0050b420
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x433c
ret 0x10
cmp ebx, 1
jne 0x50b6b4
mov edi, dword [esp + 0x4354]
jmp 0x50b7aa
mov ebp, dword [esp + 0x4354]
mov edi, ebp
mov ecx, ebp
mov ax, word [ebp]
test ax, ax
je 0x50b78c
cmp ax, 0x2f
je 0x50b6d8
cmp ax, 0x5c
jne 0x50b6db
lea edi, [ecx + 2]
mov ax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x50b6cc
cmp edi, ebp
je 0x50b78c
lea edx, [esp + 0x144]
push ebp
push edx
call dword [sym.imp.MSVCRT.dll_wcscpy]
sub edi, ebp
add esp, 8
sar edi, 1
mov word [esp + edi*2 + 0x142], 0
mov ax, word [esp + 0x144]
cmp ax, 0x2f
je 0x50b733
cmp ax, 0x5c
je 0x50b733
cmp word [esp + 0x146], 0x3a
mov byte [esp + 0x13], 0
jne 0x50b738
mov byte [esp + 0x13], 1
mov edi, dword [sym.imp.MSVCRT.dll_wcsstr]
lea eax, [esp + 0x144]
push 0x56fd18
push eax
call edi
lea ecx, [esp + 0x14c]
push 0x56fd10
push ecx
mov ebx, eax
call edi
add esp, 0x10
test eax, eax
setne dl
test ebx, ebx
setne al
or dl, al
mov al, byte [esp + 0x13]
or dl, al
jne 0x50b78c
lea ecx, [esp + 0x144]
lea edx, [esi + 0x138]
push ecx
push edx
call fcn.0050b420
add esp, 8
mov eax, dword [esp + 0x120]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x50b7c1
pop edi
pop esi
pop ebp
mov eax, 0x200
pop ebx
add esp, 0x433c
ret 0x10
mov ecx, dword [esi]
push ecx
call fcn.0050aad0
mov eax, dword [esi]
lea edx, [esp + 0x350]
push 0x4000
push edx
push eax
xor bl, bl
call fcn.0050ac00
add esp, 0x10
test eax, eax
jl 0x50b822
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x50b824
lea ecx, [esp + 0x14]
push 0
push ecx
lea edx, [esp + 0x354]
push eax
push edx
push edi
call ebp
test eax, eax
je 0x50b822
mov ecx, dword [esi]
lea eax, [esp + 0x34c]
push 0x4000
push eax
push ecx
call fcn.0050ac00
add esp, 0xc
test eax, eax
jge 0x50b7ed
mov bl, 1
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x50b853
test bl, bl
jne 0x50b853
lea edx, [esp + 0x134]
lea eax, [esp + 0x124]
push edx
lea ecx, [esp + 0x130]
push eax
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x435c], 1
je 0x50b864
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esi]
push edx
call fcn.0050ade0
add esp, 4
test eax, eax
setl al
test bl, bl
jne 0x50b88b
test al, al
jne 0x50b88b
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x433c
ret 0x10
pop edi
pop esi
pop ebp
mov eax, 0x400
pop ebx
add esp, 0x433c
ret 0x10