Function at 0x411fec
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x14c
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x130], 0
mov dword [ebp - 0x13c], 0
mov eax, dword [ebp + 0x10]
cmp dword [ebp - 0x130], eax
jge 0x4121da
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + edx*4], 0
je 0x4121c5
mov eax, dword [ecx + edx*4]
cmp dword [eax + 0x10c], 0
je 0x4120bf
cmp dword [eax + 0x114], 0
jne 0x4120bf
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x1c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x128]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
lea edi, [ebp - 0x128]
cld
mov ecx, 0xffffffff
mov al, 0
repne scasb al, byte es:[edi]
not ecx
mov word [ecx + ebp - 0x129], 0x2f
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + edx*4]
mov eax, dword [eax + 0x10c]
mov dword [esp + 4], eax
lea esi, [ebp - 0x128]
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov eax, dword [ebp - 0x13c]
mov edx, dword [ebp + 0xc]
mov ebx, dword [edx + eax*4]
mov dword [esp], esi
call sub.msvcrt.dll__strdup
mov dword [ebx + 0x114], eax
mov esi, dword [ebp - 0x13c]
mov eax, dword [ebp + 0xc]
mov ebx, dword [eax + esi*4]
cmp dword [ebx + 0x10c], 0
je 0x41210b
mov eax, dword [str.TRANS.TBL]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x10c]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x41210b
lea eax, [ebx + 0xa]
mov dword [esp], eax
call fcn.00410768
mov dword [ebp - 0x12c], eax
mov dword [ebp - 0x130], esi
jmp 0x4121c5
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + edx*4]
test byte [eax + 0x21], 2
je 0x412195
mov ebx, dword [eax + 0x10c]
mov edi, 0x4517f1
mov ecx, 2
cld
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x412154
mov edi, 0x45196e
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
jne 0x41217a
mov edx, dword [ebp - 0x13c]
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + edx*4]
mov dword [esp], eax
call fcn.00411bfa
mov esi, dword [ebp - 0x13c]
mov eax, dword [ebp + 0xc]
mov dword [eax + esi*4], 0
jmp 0x4121c5
mov edx, dword [ebp + 8]
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x13c]
mov esi, dword [ebp + 0xc]
mov eax, dword [esi + ecx*4]
mov dword [esp], eax
call fcn.0041231c
mov eax, dword [ebp - 0x13c]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0xc]
mov dword [edx], eax
mov edx, dword [ebp - 0x13c]
mov eax, dword [ecx + edx*4]
mov dword [eax + 0x118], esi
mov eax, dword [ecx + edx*4]
mov dword [esi + 0xc], eax
mov dword [ecx + edx*4], 0
inc dword [ebp - 0x13c]
mov ecx, dword [ebp + 0x10]
cmp dword [ebp - 0x13c], ecx
jl 0x412025
cmp dword [ebp - 0x12c], 0
je 0x412311
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 0xc]
test ebx, ebx
je 0x4122e4
cmp dword [ebx + 0x10c], 0
je 0x412248
mov eax, dword [ebx + 0x10c]
mov dword [ebp - 0x134], eax
mov esi, eax
mov edi, 0x4517f1
mov ecx, 2
cld
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x412270
cmp dword [ebx + 0x10c], 0
je 0x412248
mov esi, dword [ebp - 0x134]
mov edi, 0x45196e
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
cmp dl, al
je 0x412270
mov eax, dword [str.TRANS.TBL]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x10c]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x412270
test byte [ebx + 0x120], 1
je 0x412311
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4121f5
mov edx, dword [ebp + 8]
mov ebx, dword [edx + 0xc]
test ebx, ebx
je 0x4122e4
mov eax, dword [str.TRANS.TBL]
mov dword [esp + 4], eax
mov eax, dword [ebx + 0x10c]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x4122de
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x16
mov dword [esp + 4], 1
mov dword [esp], str.Should_never_get_here_n
call sub.msvcrt.dll_fwrite
mov ecx, dword [ebp - 0x12c]
mov dword [esp + 4], ecx
lea eax, [ebx + 0xa]
mov dword [esp], eax
call fcn.00409367
jmp 0x412311
mov ebx, dword [ebx]
test ebx, ebx
jne 0x412284
mov esi, dword [ebp - 0x130]
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + esi*4]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0xc]
mov dword [edx], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + esi*4]
mov dword [eax + 0x118], ecx
mov eax, dword [edx + esi*4]
mov dword [ecx + 0xc], eax
mov dword [edx + esi*4], 0
add esp, 0x14c
pop ebx
pop esi
pop edi
pop ebp
ret