Function at 0x4d6bc0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x514
push ebx
push esi
mov esi, edx
cmp byte [esi], 0
push edi
mov ebx, ecx
je 0x4d6e33
mov eax, dword [0x5ee700]
test eax, eax
je 0x4d6bfa
mov edx, 0xf
mov ecx, esi
call fcn.00537560
cmp byte [esi], 0
je 0x4d6e33
push 0x1a
push esi
call fcn.005912e0
add esp, 8
test eax, eax
je 0x4d6c22
lea esp, [esp]
push 0x1a
push esi
mov byte [eax], 0x20
call fcn.005912e0
add esp, 8
test eax, eax
jne 0x4d6c10
cmp dword [ebx + 0x6b4], 0xffffffff
jne 0x4d6c66
push 0
push 0x80
push 4
push 0
push 3
push 0x40000000
lea eax, [ebx + 0x4a0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebx + 0x6b4], eax
je 0x4d6e33
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, 0x4eb
lea ecx, [esp + 0x30]
call fcn.00420e60
mov eax, dword [0x5ee70c]
test eax, eax
je 0x4d6cd3
mov eax, dword [ebp + 8]
test eax, eax
jne 0x4d6cd3
mov edx, 3
lea ecx, [esp + 0x30]
call fcn.00541a80
mov eax, dword [0x5ee700]
test eax, eax
je 0x4d6ca9
mov edx, 0xf
lea ecx, [esp + 0x30]
call fcn.00537560
mov dl, 0x20
lea ecx, [esp + 0x30]
call fcn.005379a0
mov al, byte [esp + 0x30]
test al, al
je 0x4d6cd3
lea edi, [esp + 0x30]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4d6cc1
mov cx, word [0x5a5348]
mov word [edi], cx
mov eax, esi
mov edx, esi
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d6cd7
lea edi, [esp + 0x30]
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x4d6ce5
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 + 0x30]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4d6d02
mov dx, word [0x5a4be8]
mov al, byte [0x5a4bea]
mov word [edi], dx
mov byte [edi + 2], al
mov eax, dword [0x5ee71c]
test eax, eax
je 0x4d6de5
mov esi, dword [ebp + 0xc]
cmp esi, dword [0x5c9d4c]
je 0x4d6de5
mov edx, 0x19
lea ecx, [esp + 0x14]
call fcn.00420e60
movzx ecx, byte [esp + 0x30]
push ecx
call fcn.005920a7
add esp, 4
test eax, eax
mov ecx, esi
je 0x4d6d6e
call fcn.00435dc0
push eax
push 3
push str._c_d_99
lea edx, [esp + 0x20]
push edx
jmp 0x4d6d80
call fcn.00435dc0
push eax
push 3
push str._c_d
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [esp + 0x40]
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d6d90
sub eax, edx
mov edx, eax
lea eax, [esp + 0x14]
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d6da2
sub eax, esi
inc edx
push edx
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + eax + 0x38]
push edx
call fcn.00592290
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d6dc6
sub eax, edx
mov ecx, eax
shr ecx, 2
lea esi, [esp + 0x14]
lea edi, [esp + 0x30]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x30]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4d6df0
push 0
sub eax, edx
lea ecx, [esp + 0x14]
push ecx
push eax
mov eax, dword [ebx + 0x6b4]
lea edx, [esp + 0x3c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp dword [0x5ee708], 1
jne 0x4d6e33
mov ecx, dword [ebx + 0x6b4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x6b4], 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8