Function at 0x4ec2f0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x658
mov eax, dword [0x5e95e0]
xor eax, esp
mov dword [esp + 0x654], eax
push ebx
push ebp
mov ebp, dword [esp + 0x664]
push esi
push edi
mov edi, dword [esp + 0x674]
cmp edi, 3
mov esi, edx
mov ebx, ecx
mov dword [esp + 0x18], esi
je 0x4ec33f
cmp edi, 2
je 0x4ec3f9
cmp edi, 1
je 0x4ec3f9
mov eax, 0x10000
jmp 0x4ec6c7
mov eax, dword [ebx + 4]
cmp ebp, eax
je 0x4ec39d
cmp eax, 0xffffffff
je 0x4ec352
mov edi, dword [ebx]
call fcn.004eba10
mov eax, dword [ebx]
mov dword [ebx + 4], 0xffffffff
cmp ebp, dword [eax + 4]
jge 0x4ec335
cmp ebp, dword [eax + 0x10]
jge 0x4ec370
mov esi, eax
call fcn.004eb3a0
mov esi, dword [esp + 0x18]
mov eax, dword [ebx]
cmp dword [eax + 0x10], ebp
jge 0x4ec389
mov esi, dword [ebx]
call fcn.004eb3e0
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], ebp
jl 0x4ec377
mov esi, dword [esp + 0x18]
mov edx, dword [ebx + 0x23c]
mov eax, dword [ebx]
push edx
call fcn.004eb620
add esp, 4
mov dword [ebx + 4], ebp
mov ecx, dword [esp + 0x670]
lea eax, [esp + 0x17]
push eax
mov eax, dword [ebx]
push esi
call fcn.004eb7a0
mov esi, eax
add esp, 8
test esi, esi
jg 0x4ec3c8
mov edi, dword [ebx]
call fcn.004eba10
mov dword [ebx + 4], 0xffffffff
cmp byte [esp + 0x17], 0
jne 0x4ec4b2
test esi, esi
jle 0x4ec3e1
mov eax, 0x600
jmp 0x4ec6c7
mov eax, esi
sub eax, 0xffffff96
neg eax
sbb eax, eax
and eax, 0x4fff000
add eax, 0x1000
jmp 0x4ec6c7
cmp dword [ebx + 4], 0xffffffff
je 0x4ec40d
mov edi, dword [ebx]
call fcn.004eba10
mov edi, dword [esp + 0x674]
mov eax, dword [ebx]
mov dword [ebx + 4], 0xffffffff
cmp ebp, dword [eax + 4]
jge 0x4ec335
cmp ebp, dword [eax + 0x10]
jge 0x4ec436
mov esi, eax
call fcn.004eb3a0
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x674]
mov ecx, dword [ebx]
cmp dword [ecx + 0x10], ebp
jge 0x4ec459
lea ecx, [ecx]
mov esi, dword [ebx]
call fcn.004eb3e0
mov edx, dword [ebx]
cmp dword [edx + 0x10], ebp
jl 0x4ec440
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x674]
lea eax, [esp + 0x20]
push eax
push ebp
mov ecx, ebx
call fcn.004ebc50
test byte [esp + 0x22c], 0x10
je 0x4ec4b9
cmp edi, 1
je 0x4ec4b2
movzx eax, word [esi]
cmp ax, 0x2f
je 0x4ec490
cmp ax, 0x5c
je 0x4ec490
test ax, ax
je 0x4ec4a2
cmp word [esi + 2], 0x3a
jne 0x4ec4a2
push esi
push 0
call fcn.004ec1b0
add esp, 8
xor eax, eax
jmp 0x4ec6c7
push esi
add ebx, 0x244
push ebx
call fcn.004ec1b0
add esp, 8
xor eax, eax
jmp 0x4ec6c7
xor ebp, ebp
cmp edi, 1
mov edi, esi
je 0x4ec574
movzx eax, word [esi]
cmp ax, bp
mov ecx, esi
je 0x4ec4ee
movzx eax, ax
cmp ax, 0x2f
je 0x4ec4df
cmp ax, 0x5c
jne 0x4ec4e2
lea edi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
cmp ax, bp
jne 0x4ec4d3
lea edx, [esp + 0x250]
mov eax, esi
sub edx, esi
lea esp, [esp]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
cmp cx, bp
jne 0x4ec500
cmp edi, esi
jne 0x4ec583
mov word [esp + 0x250], bp
push edi
lea edx, [esp + 0x254]
push edx
lea esi, [ebx + 0x244]
push esi
lea eax, [esp + 0x464]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea ecx, [esp + 0x250]
push ecx
push esi
call fcn.004ec1b0
add esp, 8
mov edx, dword [esp + 0x22c]
push ebp
push edx
push 2
push ebp
push ebp
push 0x40000000
lea eax, [esp + 0x470]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4ec5ef
mov eax, 0x200
jmp 0x4ec6c7
mov ecx, edi
sub ecx, esi
sar ecx, 1
mov word [esp + ecx*2 + 0x250], bp
mov ax, word [esp + 0x250]
cmp ax, 0x2f
je 0x4ec5bd
cmp ax, 0x5c
je 0x4ec5bd
cmp ax, bp
je 0x4ec51b
cmp word [esp + 0x252], 0x3a
jne 0x4ec51b
push edi
lea edx, [esp + 0x254]
push edx
lea eax, [esp + 0x460]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [esp + 0x260]
push ecx
push ebp
call fcn.004ec1b0
add esp, 0x18
jmp 0x4ec552
mov ecx, dword [ebx + 0x23c]
mov eax, dword [ebx]
push ecx
call fcn.004eb620
add esp, 4
cmp dword [ebx + 0x240], ebp
jne 0x4ec61b
push 0x4000
call fcn.005308fb
add esp, 4
mov dword [ebx + 0x240], eax
mov dword [esp + 0x18], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebx + 0x240]
lea edx, [esp + 0x17]
push edx
push eax
mov eax, dword [ebx]
mov ecx, 0x4000
call fcn.004eb7a0
mov esi, eax
add esp, 8
cmp esi, 0xffffff96
je 0x4ec678
test esi, esi
jl 0x4ec66e
jle 0x4ec663
mov edx, dword [ebx + 0x240]
push 0
lea ecx, [esp + 0x20]
push ecx
push esi
push edx
push edi
call ebp
test eax, eax
je 0x4ec682
cmp byte [esp + 0x17], 0
jne 0x4ec68c
test esi, esi
jne 0x4ec625
mov dword [esp + 0x18], 0x5000000
jmp 0x4ec6ab
mov dword [esp + 0x18], 0x1000
jmp 0x4ec6ab
mov dword [esp + 0x18], 0x400
jmp 0x4ec6ab
lea eax, [esp + 0x240]
push eax
lea ecx, [esp + 0x234]
push ecx
lea edx, [esp + 0x240]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x674], 1
je 0x4ec6bc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebx]
call fcn.004eba10
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00552101
add esp, 0x658
ret 0xc