Function at 0x4cb050
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x4f4
push esi
mov esi, edx
cmp byte [esi], 0
push edi
mov edi, ecx
mov dword [esp + 8], edi
je 0x4cb316
mov eax, dword [0x5a9e48]
test eax, eax
je 0x4cb087
mov edx, 0xf
mov ecx, esi
call fcn.00524b30
cmp byte [esi], 0
je 0x4cb316
push 0x1a
push esi
call fcn.00570260
add esp, 8
test eax, eax
je 0x4cb0a8
push 0x1a
push esi
mov byte [eax], 0x20
call fcn.00570260
add esp, 8
test eax, eax
jne 0x4cb096
cmp dword [edi + 0x6b4], 0xffffffff
je 0x4cb1d8
mov edx, 0x4eb
lea ecx, [esp + 0x10]
call fcn.0041ef30
mov eax, dword [0x5a9e54]
test eax, eax
je 0x4cb125
mov eax, dword [esp + 0x500]
test eax, eax
jne 0x4cb125
mov edx, 1
lea ecx, [esp + 0x10]
call fcn.0052ef00
mov eax, dword [0x5a9e48]
test eax, eax
je 0x4cb0fc
mov edx, 0xf
lea ecx, [esp + 0x10]
call fcn.00524b30
mov dl, 0x20
lea ecx, [esp + 0x10]
call fcn.00524ec0
mov al, byte [esp + 0x10]
test al, al
je 0x4cb125
lea edi, [esp + 0x10]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4cb114
mov ax, word [0x5842b8]
mov word [edi], ax
mov eax, esi
mov edx, esi
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4cb130
lea edi, [esp + 0x10]
sub eax, edx
dec edi
mov edi, edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4cb140
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4cb160
mov cx, word [0x583b70]
mov dl, byte [0x583b72]
mov word [edi], cx
lea eax, [esp + 0x10]
mov byte [edi + 2], dl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4cb182
mov esi, dword [esp + 8]
push 0
sub eax, edx
lea ecx, [esp + 0x10]
push ecx
push eax
mov eax, dword [esi + 0x6b4]
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x5a9e50], 1
jne 0x4cb316
mov ecx, dword [esi + 0x6b4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 0x6b4], 0xffffffff
pop esi
add esp, 0x4f4
ret 4
push ebx
push 0
push 0x80
push 4
push 0
push 3
push 0x40000000
add edi, 0x4a0
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4cb315
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, 0x4eb
lea ecx, [esp + 0x14]
call fcn.0041ef30
mov eax, dword [0x5a9e54]
test eax, eax
je 0x4cb282
mov eax, dword [esp + 0x504]
test eax, eax
jne 0x4cb282
mov edx, 1
lea ecx, [esp + 0x14]
call fcn.0052ef00
mov eax, dword [0x5a9e48]
test eax, eax
je 0x4cb257
mov edx, 0xf
lea ecx, [esp + 0x14]
call fcn.00524b30
mov dl, 0x20
lea ecx, [esp + 0x14]
call fcn.00524ec0
mov al, byte [esp + 0x14]
test al, al
je 0x4cb282
lea edi, [esp + 0x14]
dec edi
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4cb270
mov dx, word [0x5842b8]
mov word [edi], dx
mov eax, esi
mov edx, esi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4cb286
lea edi, [esp + 0x14]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4cb294
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4cb2b1
mov ax, word [0x583b70]
mov cl, byte [0x583b72]
mov word [edi], ax
lea eax, [esp + 0x14]
mov byte [edi + 2], cl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4cb2d2
sub eax, edx
push 0
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x5a9e50]
test eax, eax
jne 0x4cb30e
mov ecx, dword [esp + 0xc]
mov dword [ecx + 0x6b4], ebx
pop ebx
pop edi
pop esi
add esp, 0x4f4
ret 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
add esp, 0x4f4
ret 4