Function at 0x41c177
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
xor eax, eax
mov dword [ebp - 8], ecx
push esi
push edi
mov dword [ebp - 0xc], eax
cmp dword [ebp + 8], eax
je 0x41c598
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x41c598
mov eax, 0x400
xor ebx, ebx
push eax
mov dword [ebp - 0x14], eax
call fcn.004ac04c
mov edi, eax
mov dword [ebp - 0x18], edi
pop ecx
test edi, edi
jne 0x41c1bd
push 0xe
jmp 0x41c59a
mov eax, dword [ebp - 8]
test byte [eax + 0x14], 1
jne 0x41c1ec
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x41c1ec
mov ebx, eax
mov ecx, edi
mov edx, eax
shl ebx, 2
mov eax, dword [0x4dde90]
mov dword [ecx], eax
lea ecx, [ecx + 4]
mov al, byte [0x4dde94]
mov byte [ecx], al
sub edx, 1
jne 0x41c1d6
mov ecx, esi
call fcn.0041b479
push eax
lea eax, [ebx + edi]
push 0x4dde98
push eax
call fcn.00418a96
add ebx, eax
add esp, 0xc
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [esi + 0x20], eax
jle 0x41c37f
mov ecx, dword [esi + 0x1c]
mov ecx, dword [ecx + eax*4]
call fcn.0041b4dc
push eax
call fcn.0041c5a2
mov dword [ebp - 0x10], eax
pop ecx
test eax, eax
je 0x41c2a7
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c233
sub ecx, edx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x1c]
mov esi, dword [ebp - 4]
mov ecx, dword [ecx + esi*4]
call fcn.0041b479
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c252
mov eax, dword [ebp - 0x1c]
sub ecx, edx
add eax, 0x14
add eax, ecx
push eax
call fcn.004ac04c
mov esi, eax
pop ecx
push dword [ebp - 0x10]
test esi, esi
je 0x41c3a8
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [ecx + 0x1c]
mov ecx, dword [ecx + eax*4]
call fcn.0041b479
push eax
push str.__s__s_
push esi
call fcn.00418a96
push dword [ebp - 0x10]
mov dword [ebp - 0x1c], eax
call fcn.004ac047
mov eax, dword [ebp - 0x1c]
add esp, 0x14
jmp 0x41c326
mov ecx, dword [esi + 0x1c]
mov eax, dword [ebp - 4]
mov ecx, dword [ecx + eax*4]
call fcn.0041b4dc
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c2ba
mov eax, dword [ebp - 4]
sub ecx, edx
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x1c]
mov ecx, dword [ecx + eax*4]
call fcn.0041b479
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c2d9
mov eax, dword [ebp - 0x1c]
sub ecx, edx
add eax, 0x14
add eax, ecx
push eax
call fcn.004ac04c
mov dword [ebp - 0x1c], eax
pop ecx
test eax, eax
je 0x41c556
mov eax, dword [esi + 0x1c]
mov esi, dword [ebp - 4]
mov esi, dword [eax + esi*4]
mov ecx, esi
call fcn.0041b4dc
push eax
mov ecx, esi
call fcn.0041b479
mov esi, dword [ebp - 0x1c]
push eax
push str.__s__s_
push esi
call fcn.00418a96
add esp, 0x10
mov ecx, dword [ebp - 0x14]
lea edx, [eax + ebx]
mov dword [ebp - 0x1c], edx
cmp edx, ecx
jl 0x41c353
add ecx, 0x104
add ecx, eax
push ecx
push edi
mov dword [ebp - 0x14], ecx
call fcn.004ac057
pop ecx
pop ecx
test eax, eax
je 0x41c3ba
mov edx, dword [ebp - 0x1c]
mov edi, eax
mov dword [ebp - 0x18], edi
sub ebx, esi
mov ecx, esi
add ebx, edi
mov al, byte [ecx]
mov byte [ebx + ecx], al
inc ecx
test al, al
jne 0x41c359
push esi
mov ebx, edx
call fcn.004ac047
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 0xc]
inc eax
pop ecx
mov dword [ebp - 4], eax
cmp eax, dword [esi + 0x20]
jl 0x41c215
mov eax, dword [esi + 0x30]
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x41c3fb
mov ecx, esi
call fcn.0041b4dc
test eax, eax
jne 0x41c3fb
mov eax, dword [ebp - 8]
test byte [eax + 0x14], 2
je 0x41c3bd
mov dword [ebx + edi], 0x3e2f20
push 3
jmp 0x41c3d2
call fcn.004ac047
push edi
call fcn.004ac047
pop ecx
pop ecx
jmp 0x41c1b6
push esi
jmp 0x41c3a8
mov eax, dword [str.____r_n]
mov dword [ebx + edi], eax
mov ax, word [0x4ddeac]
mov word [ebx + edi + 4], ax
push 5
pop eax
add eax, ebx
push 0
lea ecx, [ebp - 0x20]
push ecx
push eax
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41c586
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x41c589
mov ecx, esi
call fcn.0041b4dc
mov dword [ebp - 4], eax
test eax, eax
je 0x41c561
mov byte [ebx + edi], 0x3e
inc ebx
push eax
call fcn.0041c5a2
mov esi, eax
pop ecx
test esi, esi
je 0x41c426
mov edx, esi
mov dword [ebp - 4], edx
jmp 0x41c429
mov edx, dword [ebp - 4]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x10], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41c431
sub ecx, dword [ebp - 0x10]
lea eax, [ecx + ebx]
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
cmp eax, ecx
jle 0x41c467
lea eax, [ecx + 0x104]
push eax
push edi
call fcn.004ac057
pop ecx
pop ecx
test eax, eax
je 0x41c54b
mov edx, dword [ebp - 4]
mov edi, eax
mov dword [ebp - 0x18], edi
sub ebx, edx
mov ecx, edx
lea edx, [ebx + edi]
mov al, byte [ecx]
mov byte [edx + ecx], al
inc ecx
test al, al
jne 0x41c46e
test esi, esi
je 0x41c483
push esi
call fcn.004ac047
pop ecx
mov ebx, dword [ebp - 0x10]
mov esi, dword [ebp + 0xc]
push 0
lea eax, [ebp - 0x20]
push eax
push ebx
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x41c4ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x41c4e0
xor ebx, ebx
cmp dword [ebp - 0x1c], ebx
jle 0x41c4e0
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp - 0x1c]
inc ecx
mov dword [ebp + 0xc], ecx
mov eax, dword [esi + 0x2c]
push ecx
mov ecx, dword [ebp - 8]
push dword [eax + ebx*4]
push dword [ebp + 8]
call fcn.0041c177
mov dword [ebp - 0xc], eax
test eax, eax
jne 0x41c4dd
mov ecx, dword [ebp + 0xc]
inc ebx
cmp ebx, edi
jl 0x41c4bc
mov edi, dword [ebp - 0x18]
and dword [ebp + 0xc], 0
cmp dword [ebp - 4], 0
mov ebx, dword [ebp - 8]
jne 0x41c51a
test byte [ebx + 0x14], 1
jne 0x41c51a
mov edx, dword [ebp + 0x10]
test edx, edx
jle 0x41c51a
mov eax, edx
mov ecx, edi
shl eax, 2
mov dword [ebp + 0xc], eax
mov eax, dword [0x4dde90]
mov dword [ecx], eax
lea ecx, [ecx + 4]
mov al, byte [0x4dde94]
mov byte [ecx], al
sub edx, 1
jne 0x41c504
mov ebx, dword [ebx + 0x14]
mov ecx, esi
call fcn.0041b479
mov esi, dword [ebp + 0xc]
mov ecx, str.___s_
lea edx, [esi + edi]
test bl, 2
jne 0x41c539
mov ecx, str.___s__r_n
push eax
push ecx
push edx
call fcn.00418a96
add esp, 0xc
add eax, esi
jmp 0x41c3d5
test esi, esi
je 0x41c556
push esi
call fcn.004ac047
pop ecx
push edi
call fcn.004ac047
jmp 0x41c3b4
mov eax, dword [ebp - 8]
test byte [eax + 0x14], 2
je 0x41c577
push 0x3e
pop eax
mov word [ebx + edi], ax
inc ebx
jmp 0x41c489
mov dword [ebx + edi], 0xa0d3e
add ebx, 3
jmp 0x41c489
mov ebx, dword [ebp - 0xc]
test edi, edi
je 0x41c594
push edi
call fcn.004ac047
pop ecx
mov eax, ebx
jmp 0x41c59b
push 0x57
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc