Function at 0x4a63a0
Capabilities:
Write file on windows

Disassembly:
mov eax, 0x4340
call fcn.004b8b20
mov eax, dword [0x537700]
xor eax, esp
mov dword [esp + 0x433c], eax
push ebx
mov ebx, dword [esp + 0x434c]
push ebp
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x4360]
cmp ecx, 3
je 0x4a6410
cmp ecx, 2
je 0x4a6410
cmp ecx, 1
jne 0x4a6406
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x4a63ed
push dword [edi]
call fcn.004a9370
add esp, 4
mov esi, dword [edi]
mov ebp, dword [esp + 0x4354]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [esi + 4]
jl 0x4a6504
mov eax, 0x10000
jmp 0x4a67de
mov eax, dword [edi + 4]
cmp ecx, 3
jne 0x4a63de
mov ebp, dword [esp + 0x4354]
cmp ebp, eax
je 0x4a64bf
cmp eax, 0xffffffff
je 0x4a6436
push dword [edi]
call fcn.004a9370
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [eax + 4]
jge 0x4a6406
cmp ebp, dword [eax + 0x10]
jge 0x4a6452
push eax
call fcn.004a93f0
add esp, 4
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jge 0x4a64b3
nop dword [eax]
test esi, esi
je 0x4a64ac
cmp dword [esi + 0x18], 0
je 0x4a64ac
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x4a64ac
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.004a9d80
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jl 0x4a6460
push esi
call fcn.004a96d0
add esp, 4
mov dword [edi + 4], ebp
push dword [esp + 0x435c]
push ebx
push dword [edi]
call fcn.004a99f0
mov esi, eax
add esp, 0xc
test esi, esi
jle 0x4a64e1
mov eax, 0x600
jmp 0x4a67de
push dword [edi]
call fcn.004a9370
add esp, 4
mov dword [edi + 4], 0xffffffff
test esi, esi
je 0x4a65e8
mov eax, 0x5000000
jmp 0x4a67de
cmp ebp, dword [esi + 0x10]
jge 0x4a653f
test esi, esi
je 0x4a653f
mov eax, dword [esi + 0x24]
push 0
push 0
push 0
push 0
push 0
mov dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push eax
lea eax, [esi + 0x28]
mov dword [esi + 0x10], 0
push eax
push esi
call fcn.004a9d80
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jge 0x4a6599
test esi, esi
je 0x4a6592
cmp dword [esi + 0x18], 0
je 0x4a6592
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x4a6592
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.004a9d80
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jl 0x4a6546
lea eax, [esp + 0x18]
mov ecx, edi
push eax
push ebp
call fcn.004a5cf0
test byte [esp + 0x120], 0x10
je 0x4a65ef
cmp dword [esp + 0x4360], 1
je 0x4a65e8
push 0x103
lea eax, [esp + 0x148]
push eax
lea eax, [esp + 0x24]
push eax
call fcn.004a6150
lea eax, [esp + 0x150]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.004a59e0
add esp, 0x14
xor eax, eax
jmp 0x4a67de
mov ebp, dword [esp + 0x4360]
cmp ebp, 1
je 0x4a6713
movzx eax, word [ebx]
mov edx, ebx
mov ecx, ebx
test ax, ax
je 0x4a66f6
mov esi, eax
cmp si, 0x2f
je 0x4a6622
cmp si, 0x5c
je 0x4a6622
add ecx, 2
jmp 0x4a6627
lea edx, [ecx + 2]
mov ecx, edx
movzx eax, word [ecx]
mov esi, eax
test ax, ax
jne 0x4a6611
cmp edx, ebx
je 0x4a66f6
lea esi, [esp + 0x144]
mov ecx, ebx
sub esi, ebx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [esi + ecx - 2], ax
test ax, ax
jne 0x4a6644
sub edx, ebx
sar edx, 1
lea edx, [edx*2 - 2]
cmp edx, 0x208
jae 0x4a67f9
xor eax, eax
mov word [esp + edx + 0x144], ax
mov ax, word [esp + 0x144]
cmp ax, 0x2f
je 0x4a6699
cmp ax, 0x5c
je 0x4a6699
cmp word [esp + 0x146], 0x3a
mov byte [esp + 0x13], 0
jne 0x4a669e
mov byte [esp + 0x13], 1
lea eax, [esp + 0x144]
push 0x4fdaf0
push eax
call fcn.004bac62
mov esi, eax
lea eax, [esp + 0x14c]
push 0x4fdaf8
push eax
call fcn.004bac62
movzx ecx, byte [esp + 0x23]
add esp, 0x10
test eax, eax
mov eax, 1
setne dl
test esi, esi
cmovne ecx, eax
or dl, cl
jne 0x4a66f6
lea eax, [esp + 0x144]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.004a59e0
add esp, 8
push 0
push dword [esp + 0x124]
push 2
push 0
push 0
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4a6722
mov eax, 0x200
jmp 0x4a67de
push dword [edi]
call fcn.004a96d0
push 0x4000
lea eax, [esp + 0x354]
mov byte [esp + 0x1b], 0
push eax
push dword [edi]
call fcn.004a99f0
add esp, 0x10
test eax, eax
js 0x4a6783
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x4a6788
push 0
lea ecx, [esp + 0x18]
push ecx
push eax
lea eax, [esp + 0x358]
push eax
push ebx
call esi
test eax, eax
je 0x4a6783
push 0x4000
lea eax, [esp + 0x350]
push eax
push dword [edi]
call fcn.004a99f0
add esp, 0xc
test eax, eax
jns 0x4a674f
mov byte [esp + 0x13], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x4a67ba
cmp byte [esp + 0x13], 0
jne 0x4a67ba
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp ebp, 1
je 0x4a67c6
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.004a9370
xor eax, eax
add esp, 4
cmp byte [esp + 0x13], al
mov ecx, 0x400
cmovne eax, ecx
mov ecx, dword [esp + 0x434c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004b847a
add esp, 0x4340
ret 0x10
call fcn.004b85cd
int3