Function at 0x41b642
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x434c
call fcn.004933d0
mov eax, dword [0x4f51d0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x14], 3
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x4348], eax
je 0x41b68b
cmp dword [ebp + 0x14], 2
je 0x41b71b
cmp dword [ebp + 0x14], 1
je 0x41b71b
mov eax, 0x10000
jmp 0x41b961
mov eax, dword [edi + 4]
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x41b6df
cmp eax, 0xffffffff
je 0x41b6a1
mov ebx, dword [edi]
call fcn.0041aeb2
mov eax, dword [edi]
or dword [edi + 4], 0xffffffff
cmp esi, dword [eax + 4]
jge 0x41b681
cmp esi, dword [eax + 0x10]
jge 0x41b6bb
mov esi, eax
call fcn.0041a88b
mov esi, dword [ebp + 8]
mov eax, dword [edi]
cmp dword [eax + 0x10], esi
jge 0x41b6d5
mov esi, dword [edi]
call fcn.0041a8c0
mov eax, dword [edi]
mov ecx, dword [ebp + 8]
cmp dword [eax + 0x10], ecx
jl 0x41b6c2
mov esi, ecx
mov eax, dword [edi]
call fcn.0041abd3
mov dword [edi + 4], esi
push dword [ebp - 0x4348]
mov ecx, dword [ebp + 0x10]
mov eax, dword [edi]
call fcn.0041acb9
mov esi, eax
pop ecx
test esi, esi
jle 0x41b700
mov eax, 0x600
jmp 0x41b961
mov ebx, dword [edi]
call fcn.0041aeb2
or dword [edi + 4], 0xffffffff
mov eax, esi
neg eax
sbb eax, eax
and eax, 0x5000000
jmp 0x41b961
cmp dword [edi + 4], 0xffffffff
je 0x41b728
mov ebx, dword [edi]
call fcn.0041aeb2
mov esi, dword [edi]
mov ebx, dword [ebp + 8]
or dword [edi + 4], 0xffffffff
cmp ebx, dword [esi + 4]
jge 0x41b681
cmp ebx, dword [esi + 0x10]
jge 0x41b74d
call fcn.0041a88b
jmp 0x41b74d
mov esi, dword [edi]
call fcn.0041a8c0
mov eax, dword [edi]
cmp dword [eax + 0x10], ebx
jl 0x41b746
push ebx
lea edx, [ebp - 0x4340]
mov ecx, edi
call fcn.0041b096
test byte [ebp - 0x4238], 0x10
je 0x41b7a3
cmp dword [ebp + 0x14], 1
jne 0x41b778
xor eax, eax
jmp 0x41b961
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x433c]
push eax
call fcn.00419f7f
lea eax, [ebp - 0x210]
push eax
add edi, 0x138
push edi
call fcn.0041b55a
add esp, 0x10
jmp 0x41b771
cmp dword [ebp + 0x14], 1
mov ebx, dword [ebp - 0x4348]
je 0x41b8a3
movzx eax, word [ebx]
mov edx, ebx
mov ecx, ebx
test ax, ax
je 0x41b888
movzx eax, ax
cmp ax, 0x2f
je 0x41b7d2
cmp ax, 0x5c
jne 0x41b7d5
lea edx, [ecx + 2]
inc ecx
inc ecx
movzx eax, word [ecx]
test ax, ax
jne 0x41b7c6
cmp edx, ebx
je 0x41b888
lea esi, [ebp - 0x210]
mov eax, ebx
sub esi, ebx
movzx ecx, word [eax]
mov word [esi + eax], cx
inc eax
inc eax
test cx, cx
jne 0x41b7f1
sub edx, ebx
sar edx, 1
xor eax, eax
mov word [ebp + edx*2 - 0x212], ax
cmp word [ebp - 0x210], 0x2f
je 0x41b831
cmp word [ebp - 0x210], 0x5c
je 0x41b831
cmp word [ebp - 0x20e], 0x3a
mov byte [ebp - 0x4341], al
jne 0x41b838
mov byte [ebp - 0x4341], 1
lea eax, [ebp - 0x210]
push 0x4d9340
push eax
call fcn.0048d376
mov esi, eax
lea eax, [ebp - 0x210]
push 0x4d9348
push eax
call fcn.0048d376
add esp, 0x10
test eax, eax
setne al
test esi, esi
setne cl
or al, cl
or al, byte [ebp - 0x4341]
jne 0x41b888
lea eax, [ebp - 0x210]
push eax
lea eax, [edi + 0x138]
push eax
call fcn.0041b55a
pop ecx
pop ecx
xor eax, eax
push eax
push dword [ebp - 0x4238]
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x41b8b2
mov eax, 0x200
jmp 0x41b961
mov eax, dword [edi]
call fcn.0041abd3
mov byte [ebp - 0x4341], 0
mov esi, 0x4000
jmp 0x41b8e5
je 0x41b901
push 0
lea ecx, [ebp - 0x4348]
push ecx
push eax
lea eax, [ebp - 0x4210]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41b8fa
lea eax, [ebp - 0x4210]
push eax
mov eax, dword [edi]
mov ecx, esi
call fcn.0041acb9
pop ecx
test eax, eax
jge 0x41b8c7
mov byte [ebp - 0x4341], 1
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x41b932
cmp byte [ebp - 0x4341], 0
jne 0x41b932
lea eax, [ebp - 0x4224]
push eax
lea eax, [ebp - 0x4234]
push eax
lea eax, [ebp - 0x422c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x41b93f
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [edi]
call fcn.0041aeb2
test eax, eax
setl al
cmp byte [ebp - 0x4341], 0
jne 0x41b95c
test al, al
je 0x41b771
mov eax, 0x400
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0048c64c
leave
ret 0x10