Function at 0x41972d
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x5d4]
sub esp, 0x654
mov eax, dword [0x4b4970]
xor eax, ebp
mov dword [ebp + 0x5d0], eax
cmp dword [ebp + 0x5e8], 3
push ebx
mov ebx, dword [ebp + 0x5e0]
push esi
push edi
mov esi, ecx
je 0x419780
cmp dword [ebp + 0x5e8], 2
je 0x41982c
cmp dword [ebp + 0x5e8], 1
je 0x41982c
mov eax, 0x10000
jmp 0x419ab9
mov eax, dword [esi + 4]
mov edi, dword [ebp + 0x5dc]
cmp edi, eax
je 0x4197d2
cmp eax, 0xffffffff
je 0x41979a
push dword [esi]
call fcn.004179dc
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x419776
cmp edi, dword [eax + 0x10]
jge 0x4197ba
push eax
call fcn.0041779e
jmp 0x4197b9
push dword [esi]
call fcn.004177dc
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x4197b2
push dword [esi + 0x23c]
push eax
call fcn.004191f0
pop ecx
pop ecx
mov dword [esi + 4], edi
lea eax, [ebp - 0x71]
push eax
push dword [ebp + 0x5e4]
push ebx
push dword [esi]
call fcn.0041934f
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x4197f9
push dword [esi]
call fcn.004179dc
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x71], 0
je 0x419806
xor eax, eax
jmp 0x419ab9
test edi, edi
jle 0x419814
mov eax, 0x600
jmp 0x419ab9
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x419ab9
cmp dword [esi + 4], 0xffffffff
je 0x41983a
push dword [esi]
call fcn.004179dc
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 0x5dc]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x419776
cmp edi, dword [eax + 0x10]
jge 0x419864
push eax
call fcn.0041779e
jmp 0x419863
push dword [esi]
call fcn.004177dc
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x41985c
lea eax, [ebp - 0x70]
push eax
push edi
mov ecx, esi
call fcn.00417b5e
test byte [ebp + 0x19c], 0x10
je 0x4198c2
cmp dword [ebp + 0x5e8], 1
je 0x4197ff
movzx eax, word [ebx]
cmp ax, 0x2f
je 0x4198a8
cmp ax, 0x5c
je 0x4198a8
test ax, ax
je 0x4198ad
cmp word [ebx + 2], 0x3a
jne 0x4198ad
push ebx
push 0
jmp 0x4198b5
push ebx
add esi, 0x244
push esi
call fcn.00419635
pop ecx
xor eax, eax
jmp 0x419ab8
cmp dword [ebp + 0x5e8], 1
jne 0x4198d3
mov dword [ebp - 0x7c], ebx
jmp 0x419970
movzx eax, word [ebx]
mov edi, ebx
mov ecx, ebx
test ax, ax
je 0x4198fb
movzx eax, ax
cmp ax, 0x2f
je 0x4198ee
cmp ax, 0x5c
jne 0x4198f1
lea edi, [ecx + 2]
inc ecx
inc ecx
movzx eax, word [ecx]
test ax, ax
jne 0x4198e2
push ebx
lea eax, [ebp + 0x3c8]
push 0x104
push eax
call fcn.00454727
add esp, 0xc
cmp edi, ebx
jne 0x419980
xor eax, eax
mov word [ebp + 0x3c8], ax
push edi
lea eax, [ebp + 0x3c8]
push eax
lea ebx, [esi + 0x244]
push ebx
lea eax, [ebp + 0x1c0]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp + 0x3c8]
push eax
push ebx
call fcn.00419635
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp + 0x19c]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp + 0x1c0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x4199ef
mov eax, 0x200
jmp 0x419ab9
mov eax, edi
sub eax, ebx
sar eax, 1
xor ecx, ecx
mov word [ebp + eax*2 + 0x3c8], cx
cmp word [ebp + 0x3c8], 0x2f
je 0x4199bf
cmp word [ebp + 0x3c8], 0x5c
je 0x4199bf
cmp word [ebp + 0x3c8], cx
je 0x41991d
cmp word [ebp + 0x3ca], 0x3a
jne 0x41991d
push edi
lea eax, [ebp + 0x3c8]
push eax
lea eax, [ebp + 0x1c0]
push 0x4942e4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp + 0x3c8]
push eax
push 0
call fcn.00419635
add esp, 0x18
jmp 0x41994e
push dword [esi + 0x23c]
push dword [esi]
call fcn.004191f0
cmp dword [esi + 0x240], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x419a19
push ebx
call fcn.00453559
pop ecx
mov dword [esi + 0x240], eax
and dword [ebp - 0x78], 0
lea eax, [ebp - 0x71]
push eax
push ebx
push dword [esi + 0x240]
push dword [esi]
call fcn.0041934f
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x419a6c
test edi, edi
jl 0x419a63
jle 0x419a59
push 0
lea eax, [ebp - 0x80]
push eax
push edi
push dword [esi + 0x240]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x419a75
cmp byte [ebp - 0x71], 0
jne 0x419a7e
test edi, edi
jne 0x419a1d
mov dword [ebp - 0x78], 0x5000000
jmp 0x419a9c
mov dword [ebp - 0x78], 0x1000
jmp 0x419a9c
mov dword [ebp - 0x78], 0x400
jmp 0x419a9c
lea eax, [ebp + 0x1b0]
push eax
lea eax, [ebp + 0x1a0]
push eax
lea eax, [ebp + 0x1a8]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x5e8], 1
je 0x419aae
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.004179dc
mov eax, dword [ebp - 0x78]
pop ecx
mov ecx, dword [ebp + 0x5d0]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045466b
add ebp, 0x5d4
leave
ret 0x10