Function at 0x41c904
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x65c
mov eax, dword [0x54847c]
xor eax, esp
mov dword [esp + 0x658], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
mov dword [esp + 0x10], esi
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x41c949
cmp eax, 2
je 0x41c940
cmp eax, 1
jne 0x41ca11
cmp eax, 3
jne 0x41c9f6
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x41c995
cmp dword [esi + 4], 0xffffffff
je 0x41c95e
mov ecx, dword [esi]
call fcn.0041bf4e
mov ecx, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [ecx + 4]
jge 0x41ca11
cmp dword [ecx + 0x10], ebx
jle 0x41c985
call fcn.0041b89b
jmp 0x41c980
mov ecx, dword [esi]
call fcn.0041b8d2
mov ecx, dword [esi]
cmp dword [ecx + 0x10], ebx
jl 0x41c979
mov edx, dword [esi + 0x23c]
call fcn.0041bba6
mov dword [esi + 4], ebx
mov ecx, dword [esi]
lea eax, [esp + 0x13]
push eax
push dword [ebp + 0x10]
mov edx, edi
call fcn.0041bcfa
mov edi, eax
pop ecx
pop ecx
test edi, edi
jg 0x41c9b9
mov ecx, dword [esi]
call fcn.0041bf4e
or dword [esi + 4], 0xffffffff
cmp byte [esp + 0x13], 0
jne 0x41ca51
test edi, edi
jle 0x41c9e4
mov eax, 0x600
mov ecx, dword [esp + 0x664]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c7036
mov esp, ebp
pop ebp
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x41c9cd
cmp dword [esi + 4], 0xffffffff
je 0x41ca03
mov ecx, dword [esi]
call fcn.0041bf4e
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x41ca18
mov eax, 0x10000
jmp 0x41c9cd
cmp dword [eax + 0x10], ebx
jle 0x41ca32
mov ecx, eax
call fcn.0041b89b
jmp 0x41ca2d
mov ecx, dword [esi]
call fcn.0041b8d2
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x41ca26
lea eax, [esp + 0x18]
mov ecx, esi
push eax
push ebx
call fcn.0041c1b7
test byte [esp + 0x224], 0x10
je 0x41ca84
cmp dword [ebp + 0x14], 1
jne 0x41ca58
xor eax, eax
jmp 0x41c9cd
movzx eax, word [edi]
cmp eax, 0x2f
je 0x41ca79
cmp eax, 0x5c
je 0x41ca79
test ax, ax
je 0x41ca71
cmp word [edi + 2], 0x3a
je 0x41ca79
lea ecx, [esi + 0x244]
jmp 0x41ca7b
xor ecx, ecx
mov edx, edi
call fcn.0041c7d8
jmp 0x41ca51
xor ebx, ebx
cmp dword [ebp + 0x14], 1
je 0x41cbf5
movzx eax, word [edi]
mov ecx, edi
mov dword [esp + 0x24c], edi
test ax, ax
je 0x41cad0
push 0x5c
pop esi
push 0x2f
mov edx, eax
pop ebx
cmp dx, bx
je 0x41cab3
cmp dx, si
jne 0x41cabd
lea eax, [ecx + 2]
mov dword [esp + 0x24c], eax
add ecx, 2
movzx eax, word [ecx]
mov edx, eax
test ax, ax
jne 0x41caa9
mov esi, dword [esp + 0x14]
xor ebx, ebx
push 0x208
lea eax, [esp + 0x254]
push ebx
push eax
call fcn.004df090
lea edx, [esp + 0x25c]
add esp, 0xc
mov ecx, edi
sub edx, edi
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x41caf1
mov eax, dword [esp + 0x24c]
cmp eax, edi
jne 0x41cb17
xor edi, edi
mov word [esp + 0x250], di
jmp 0x41cb39
sub eax, edi
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x41cccb
xor ecx, ecx
mov word [esp + eax + 0x250], cx
mov di, word [esp + 0x250]
push 0x208
lea eax, [esp + 0x45c]
push ebx
push eax
call fcn.004df090
add esp, 0xc
push 0x2f
pop eax
cmp di, ax
je 0x41cb9e
push 0x5c
pop eax
cmp di, ax
je 0x41cb9e
test di, di
je 0x41cb6f
cmp word [esp + 0x252], 0x3a
je 0x41cb9e
mov eax, dword [esp + 0x24c]
lea edi, [esi + 0x244]
push eax
lea eax, [esp + 0x254]
push eax
push edi
lea eax, [esp + 0x464]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x41cbc6
mov eax, dword [esp + 0x24c]
push eax
lea eax, [esp + 0x254]
push eax
lea eax, [esp + 0x460]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov edi, ebx
lea edx, [esp + 0x250]
mov ecx, edi
call fcn.0041c7d8
push ebx
push dword [esp + 0x228]
lea eax, [esp + 0x460]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x41cc04
mov eax, 0x200
jmp 0x41c9cd
mov edx, dword [esi + 0x23c]
mov ecx, dword [esi]
call fcn.0041bba6
cmp dword [esi + 0x240], ebx
jne 0x41cc2a
push 0x4000
call fcn.004c751f
pop ecx
mov dword [esi + 0x240], eax
mov edx, dword [esi + 0x240]
lea eax, [esp + 0x13]
mov ecx, dword [esi]
push eax
push 0x4000
call fcn.0041bcfa
mov dword [esp + 0x1c], eax
pop ecx
pop ecx
cmp eax, 0xffffff96
je 0x41ccab
test eax, eax
js 0x41cc7c
jle 0x41cc71
push ebx
lea ecx, [esp + 0x250]
push ecx
push eax
push dword [esi + 0x240]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41cc83
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x13], 0
jne 0x41cc8a
test eax, eax
jne 0x41cc2a
mov ebx, 0x5000000
jmp 0x41ccb0
mov ebx, 0x400
jmp 0x41ccb0
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x22c]
push eax
lea eax, [esp + 0x238]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x41ccb0
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x41ccbd
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.0041bf4e
mov eax, ebx
jmp 0x41c9cd
call fcn.004c716d
int3