Function at 0x417940
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x340
mov eax, dword [0x71cf78]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
mov ecx, dword [ebp + 0x14]
push edi
cmp ecx, 3
je 0x417971
cmp ecx, 2
je 0x417971
cmp ecx, 1
jne 0x417a7b
mov eax, dword [esi + 4]
cmp ecx, 3
jne 0x417a5b
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x4179e3
cmp eax, 0xffffffff
je 0x417993
push dword [esi]
call fcn.0041a790
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x417a7b
cmp dword [eax + 0x10], edi
jle 0x4179b8
push eax
call fcn.0041a970
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jge 0x4179d1
nop word [eax + eax]
push dword [esi]
call fcn.0041a9c0
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x4179c0
push dword [esi + 0x138]
push eax
call fcn.0041ab40
add esp, 8
mov dword [esi + 4], edi
lea eax, [ebp - 0x339]
push eax
push dword [ebp + 0x10]
push ebx
push dword [esi]
call fcn.0041ae60
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x417a0f
push dword [esi]
call fcn.0041a790
add esp, 4
mov dword [esi + 4], 0xffffffff
cmp byte [ebp - 0x339], 0
jne 0x417b08
test edi, edi
jle 0x417a38
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006026e7
mov esp, ebp
pop ebp
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
pop edi
mov ecx, 0x1000
pop esi
cmove eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006026e7
mov esp, ebp
pop ebp
ret 0x10
cmp eax, 0xffffffff
je 0x417a6a
push dword [esi]
call fcn.0041a790
add esp, 4
mov eax, dword [esi]
mov edi, dword [ebp + 8]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jl 0x417a93
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006026e7
mov esp, ebp
pop ebp
ret 0x10
cmp dword [eax + 0x10], edi
jle 0x417aa6
push eax
call fcn.0041a970
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jge 0x417ab9
push dword [esi]
call fcn.0041a9c0
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x417aa8
lea eax, [ebp - 0x338]
mov ecx, esi
push eax
push edi
call fcn.00416f50
test byte [ebp - 0x230], 0x10
je 0x417b1d
cmp dword [ebp + 0x14], 1
je 0x417b08
mov al, byte [ebx]
cmp al, 0x2f
je 0x417aef
cmp al, 0x5c
je 0x417aef
test al, al
je 0x417aeb
cmp byte [ebx + 1], 0x3a
je 0x417aef
xor dl, dl
jmp 0x417af1
mov dl, 1
xor ecx, ecx
lea eax, [esi + 0x140]
test dl, dl
push ebx
cmove ecx, eax
push ecx
call fcn.00416b20
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006026e7
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
je 0x417c12
mov al, byte [ebx]
mov edx, ebx
mov ecx, ebx
test al, al
je 0x417b44
cmp al, 0x2f
je 0x417b39
cmp al, 0x5c
jne 0x417b3c
lea edx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x417b31
lea edi, [ebp - 0x108]
mov ecx, ebx
sub edi, ebx
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edi + ecx - 1], al
test al, al
jne 0x417b50
cmp edx, ebx
jne 0x417b69
mov byte [ebp - 0x108], al
jmp 0x417b9b
mov eax, edx
sub eax, ebx
cmp eax, 0x104
jae 0x417d10
mov byte [ebp + eax - 0x108], 0
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x417bc1
cmp al, 0x5c
je 0x417bc1
test al, al
je 0x417b9b
cmp byte [ebp - 0x107], 0x3a
je 0x417bc1
push edx
lea eax, [ebp - 0x108]
push eax
lea edi, [esi + 0x140]
push edi
lea eax, [ebp - 0x20c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp 0x417be0
push edx
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
xor edi, edi
lea eax, [ebp - 0x108]
push eax
push edi
call fcn.00416b20
add esp, 8
lea eax, [ebp - 0x20c]
push 0
push dword [ebp - 0x230]
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x417c2f
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.006026e7
mov esp, ebp
pop ebp
ret 0x10
push dword [esi + 0x138]
push dword [esi]
call fcn.0041ab40
add esp, 8
cmp dword [esi + 0x13c], 0
jne 0x417c60
push 0x4000
call fcn.004206a6
add esp, 4
mov dword [esi + 0x13c], eax
nop dword [eax + eax]
lea eax, [ebp - 0x339]
push eax
push 0x4000
push dword [esi + 0x13c]
push dword [esi]
call fcn.0041ae60
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x417cdf
test edi, edi
js 0x417cb1
jle 0x417ca4
push 0
lea eax, [ebp - 0x340]
push eax
push edi
push dword [esi + 0x13c]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x417cb8
cmp byte [ebp - 0x339], 0
jne 0x417cbf
test edi, edi
jne 0x417c60
mov edi, 0x5000000
jmp 0x417ce4
mov edi, 0x400
jmp 0x417ce4
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
xor edi, edi
jmp 0x417ce4
mov edi, 0x1000
cmp dword [ebp + 0x14], 1
je 0x417cf1
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.0041a790
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, edi
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.006026e7
mov esp, ebp
pop ebp
ret 0x10
call fcn.00602dcd
int3