Function at 0x4e5232
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4348
call fcn.00524940
mov eax, dword [0x5bc324]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x4348], ebx
xor ecx, ecx
mov dword [ebp - 0x4344], edi
inc ecx
cmp eax, 3
je 0x4e527e
cmp eax, 2
je 0x4e5275
cmp eax, ecx
jne 0x4e5337
cmp eax, 3
jne 0x4e531b
mov esi, dword [ebp + 8]
cmp esi, dword [edi + 4]
je 0x4e52d0
cmp dword [edi + 4], 0xffffffff
je 0x4e5294
push dword [edi]
call fcn.004e7b11
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x4e5337
cmp dword [eax + 0x10], esi
jle 0x4e52bd
push eax
call fcn.004e7c9b
jmp 0x4e52b7
push dword [edi]
call fcn.004e7cda
mov eax, dword [edi]
pop ecx
cmp dword [eax + 0x10], esi
jl 0x4e52b0
push dword [edi + 0x138]
push eax
call fcn.004e7e24
pop ecx
pop ecx
mov dword [edi + 4], esi
push dword [ebp + 0x10]
push ebx
push dword [edi]
call fcn.004e80f6
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x4e52ee
mov eax, 0x600
jmp 0x4e53aa
push dword [edi]
call fcn.004e7b11
or dword [edi + 4], 0xffffffff
pop ecx
cmp esi, 0xffffff96
jne 0x4e5309
mov eax, 0x1000
jmp 0x4e53aa
test esi, esi
je 0x4e53a8
mov eax, 0x5000000
jmp 0x4e53aa
cmp dword [edi + 4], 0xffffffff
je 0x4e5329
push dword [edi]
call fcn.004e7b11
pop ecx
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
mov esi, dword [ebp + 8]
cmp esi, dword [eax + 4]
jl 0x4e533e
mov eax, 0x10000
jmp 0x4e53aa
cmp dword [eax + 0x10], esi
jle 0x4e5358
push eax
call fcn.004e7c9b
jmp 0x4e5352
push dword [edi]
call fcn.004e7cda
mov eax, dword [edi]
pop ecx
cmp dword [eax + 0x10], esi
jl 0x4e534b
lea eax, [ebp - 0x4338]
mov ecx, edi
push eax
push esi
call fcn.004e4ad9
xor ecx, ecx
test byte [ebp - 0x4230], 0x10
je 0x4e53bb
inc ecx
cmp dword [ebp + 0x14], ecx
je 0x4e53a8
push 0x103
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x4334]
push eax
call fcn.004e4f04
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x140]
push eax
call fcn.004e46a5
add esp, 0x14
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00523a6a
leave
ret 0x10
xor eax, eax
mov dword [ebp - 0x4340], ecx
inc eax
cmp dword [ebp + 0x14], eax
je 0x4e54e9
movzx eax, word [ebx]
mov esi, ebx
mov edx, ebx
test ax, ax
je 0x4e54d0
push 0x2f
mov edi, eax
pop eax
push 0x5c
pop ebx
cmp di, ax
je 0x4e53ef
cmp di, bx
jne 0x4e53f2
lea esi, [edx + 2]
add edx, 2
push 0x2f
movzx eax, word [edx]
mov edi, eax
test ax, ax
pop eax
jne 0x4e53e5
mov ebx, dword [ebp - 0x4348]
mov edi, dword [ebp - 0x4344]
cmp esi, ebx
je 0x4e54d0
lea eax, [ebp - 0x20c]
push ebx
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_wcscpy
sub esi, ebx
sar esi, 1
pop ecx
pop ecx
lea esi, [esi*2 - 2]
cmp esi, 0x208
jae 0x4e55c1
xor eax, eax
mov word [ebp + esi - 0x20c], ax
push 0x2f
pop eax
cmp word [ebp - 0x20c], ax
je 0x4e5471
push 0x5c
pop eax
cmp word [ebp - 0x20c], ax
je 0x4e5471
cmp word [ebp - 0x20a], 0x3a
je 0x4e5471
mov byte [ebp - 0x4339], 0
jmp 0x4e547a
xor eax, eax
inc eax
mov byte [ebp - 0x4339], al
lea eax, [ebp - 0x20c]
push 0x57a7e8
push eax
call sub.VCRUNTIME140.dll_wcsstr
mov esi, eax
lea eax, [ebp - 0x20c]
push 0x59143c
push eax
call sub.VCRUNTIME140.dll_wcsstr
movzx ecx, byte [ebp - 0x4339]
add esp, 0x10
test eax, eax
setne dl
test esi, esi
push 1
pop eax
cmovne ecx, eax
or dl, cl
jne 0x4e54ce
lea eax, [ebp - 0x20c]
push eax
lea eax, [edi + 0x140]
push eax
call fcn.004e46a5
pop ecx
pop ecx
xor ecx, ecx
push ecx
push dword [ebp - 0x4230]
push 2
push ecx
push ecx
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4e54f8
mov eax, 0x200
jmp 0x4e53aa
push dword [edi + 0x138]
push dword [edi]
call fcn.004e7e24
mov esi, 0x4000
lea eax, [ebp - 0x420c]
push esi
push eax
push dword [edi]
call fcn.004e80f6
add esp, 0x14
jmp 0x4e5552
test eax, eax
js 0x4e5557
je 0x4e5560
push 0
lea ecx, [ebp - 0x4344]
push ecx
push eax
lea eax, [ebp - 0x420c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4e5557
push esi
lea eax, [ebp - 0x420c]
push eax
push dword [edi]
call fcn.004e80f6
add esp, 0xc
cmp eax, 0xffffff96
jne 0x4e551e
xor eax, eax
inc eax
mov byte [ebp - 0x4340], al
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
xor ecx, ecx
inc ecx
cmp eax, ecx
jne 0x4e5593
cmp byte [ebp - 0x4340], 0
jne 0x4e5593
lea eax, [ebp - 0x421c]
push eax
lea eax, [ebp - 0x422c]
push eax
lea eax, [ebp - 0x4224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor eax, eax
inc eax
cmp dword [ebp + 0x14], eax
je 0x4e55a2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.004e7b11
cmp byte [ebp - 0x4340], 0
pop ecx
je 0x4e53a8
mov eax, 0x400
jmp 0x4e53aa
call fcn.0052474c
int3