Function at 0x489e43
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x51c52a
mov eax, dword fs:[0]
push eax
mov eax, 0x4354
call fcn.00455430
mov eax, dword [0x559410]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, dword [ebp + 0xc]
lea esi, [ebx + 0x340]
push esi
mov dword [ebp - 0x4350], edi
mov dword [ebp - 0x4360], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor eax, eax
cmp dword [ebp + 0x14], 3
mov dword [ebp - 0x4348], eax
mov dword [ebp - 4], eax
je 0x48a17f
cmp dword [ebp + 0x14], 2
je 0x489ec5
cmp dword [ebp + 0x14], 1
je 0x489ec5
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 0x10000
jmp 0x48a233
cmp dword [ebx + 4], 0xffffffff
je 0x489ed3
push dword [ebx]
call fcn.0048c710
pop ecx
mov ecx, dword [ebx]
or dword [ebx + 4], 0xffffffff
mov eax, dword [ebp + 8]
cmp eax, dword [ecx + 4]
jl 0x489ef0
mov dword [ebp - 0x4348], 0x10000
jmp 0x48a226
cmp eax, dword [ecx + 0x10]
jge 0x489efc
push ecx
call fcn.0048c7a1
pop ecx
mov eax, dword [ebx]
mov ecx, dword [ebp + 8]
cmp dword [eax + 0x10], ecx
jge 0x489f1d
mov esi, ecx
push dword [ebx]
call fcn.0048c7e0
mov eax, dword [ebx]
pop ecx
cmp dword [eax + 0x10], esi
jl 0x489f08
lea esi, [ebx + 0x340]
lea eax, [ebp - 0x4344]
mov ecx, ebx
push eax
push dword [ebp + 8]
call fcn.00489859
test byte [ebp - 0x423c], 0x10
je 0x489f74
cmp dword [ebp + 0x14], 1
je 0x48a226
push 0x103
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x4340]
push eax
call fcn.00489d0b
lea eax, [ebp - 0x218]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.004895f8
add esp, 0x14
jmp 0x48a212
cmp dword [ebp + 0x14], 1
je 0x48a0ab
movzx ecx, word [edi]
mov eax, edi
mov edx, edi
test cx, cx
je 0x48a090
mov dword [ebp - 0x4358], 0x2f
mov dword [ebp - 0x4354], 0x5c
cmp cx, word [ebp - 0x4358]
je 0x489fb4
cmp cx, word [ebp - 0x4354]
jne 0x489fb7
lea eax, [edx + 2]
add edx, 2
movzx ecx, word [edx]
test cx, cx
jne 0x489fa2
mov dword [ebp - 0x435c], eax
cmp eax, edi
je 0x48a090
lea eax, [ebp - 0x218]
push edi
push eax
call fcn.004fe60f
mov eax, dword [ebp - 0x435c]
sub eax, edi
sar eax, 1
pop ecx
pop ecx
lea eax, [eax*2 - 2]
cmp eax, 0x208
jae 0x48a0bf
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
mov eax, dword [ebp - 0x4358]
cmp word [ebp - 0x218], ax
je 0x48a033
mov eax, dword [ebp - 0x4354]
cmp word [ebp - 0x218], ax
je 0x48a033
cmp word [ebp - 0x216], 0x3a
mov byte [ebp - 0x4349], cl
jne 0x48a03a
mov byte [ebp - 0x4349], 1
lea eax, [ebp - 0x218]
push 0x5324d8
push eax
call fcn.00457fc9
mov edi, eax
lea eax, [ebp - 0x218]
push 0x5324e0
push eax
call fcn.00457fc9
add esp, 0x10
test eax, eax
setne cl
test edi, edi
setne al
or cl, al
or cl, byte [ebp - 0x4349]
jne 0x48a08a
lea eax, [ebp - 0x218]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.004895f8
pop ecx
pop ecx
mov edi, dword [ebp - 0x4350]
xor eax, eax
push eax
push dword [ebp - 0x423c]
push 2
push eax
push eax
push 0x40000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x48a0c4
mov dword [ebp - 0x4348], 0x200
jmp 0x48a226
call fcn.004559ce
push dword [ebx]
call fcn.0048c927
mov dword [esp], 0x4000
jmp 0x48a0f7
je 0x48a113
push 0
lea ecx, [ebp - 0x4354]
push ecx
push eax
lea eax, [ebp - 0x4218]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x48a10c
push 0x4000
lea eax, [ebp - 0x4218]
push eax
push dword [ebx]
call fcn.0048cb96
add esp, 0xc
test eax, eax
jns 0x48a0d4
mov byte [ebp - 0x4348], 1
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x48a144
cmp byte [ebp - 0x4348], 0
jne 0x48a144
lea eax, [ebp - 0x4228]
push eax
lea eax, [ebp - 0x4238]
push eax
lea eax, [ebp - 0x4230]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x48a151
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebx]
call fcn.0048c710
cmp byte [ebp - 0x4348], 0
pop ecx
je 0x48a171
mov dword [ebp - 0x4348], 0x400
jmp 0x48a226
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x48a233
mov eax, dword [ebp + 8]
cmp eax, dword [ebx + 4]
je 0x48a1e2
cmp dword [ebx + 4], 0xffffffff
je 0x48a198
push dword [ebx]
call fcn.0048c710
mov eax, dword [ebp + 8]
pop ecx
mov ecx, dword [ebx]
or dword [ebx + 4], 0xffffffff
cmp eax, dword [ecx + 4]
jge 0x489ee1
cmp eax, dword [ecx + 0x10]
jge 0x48a1b3
push ecx
call fcn.0048c7a1
pop ecx
mov eax, dword [ebx]
mov ecx, dword [ebp + 8]
cmp dword [eax + 0x10], ecx
jge 0x48a1d4
mov edi, ecx
push dword [ebx]
call fcn.0048c7e0
mov eax, dword [ebx]
pop ecx
cmp dword [eax + 0x10], edi
jl 0x48a1bf
mov edi, dword [ebp - 0x4350]
push dword [ebx]
call fcn.0048c927
mov eax, dword [ebp + 8]
pop ecx
mov dword [ebx + 4], eax
push dword [ebp + 0x10]
push edi
push dword [ebx]
call fcn.0048cb96
mov edi, eax
add esp, 0xc
test edi, edi
jle 0x48a202
mov dword [ebp - 0x4348], 0x600
jmp 0x48a226
push dword [ebx]
call fcn.0048c710
or dword [ebx + 4], 0xffffffff
pop ecx
test edi, edi
jne 0x48a21c
xor eax, eax
mov dword [ebp - 0x4348], eax
jmp 0x48a226
mov dword [ebp - 0x4348], 0x5000000
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x4348]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00453c72
mov esp, ebp
pop ebp
ret 0x10