Function at 0x417190
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [ebp - 0x14], 0
mov edi, dword [ebp + 8]
mov al, byte [ebp + 0x14]
mov dword [ebp - 0x10], 0
mov word [ebp - 0x14], 8
test edi, edi
je 0x4171da
mov edx, dword [edi + 0x10]
cmp edx, 2
je 0x4173c7
test al, al
jne 0x417252
mov eax, dword [edi + 0x64]
cmp edx, 2
mov dword [ebp - 0x10], eax
je 0x417266
push eax
lea eax, [ebp - 0x14]
push 8
push eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
push eax
call fcn.00402640
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x4173a3
mov dword [ebp - 0x28], 0
lea ecx, [ebp - 0x28]
mov al, byte [edi + 0x47]
mov edx, dword [edi + 0x44]
mov byte [ebp - 0x25], al
mov al, byte [edi + 0x46]
mov word [ebp - 0x28], dx
mov byte [ebp - 0x26], al
and edx, 0xffff
mov eax, dword [edi + 0x48]
mov dword [ebp - 0x24], eax
push eax
push edx
push ecx
mov eax, dword [ebp + 0x10]
mov esi, dword [eax]
push esi
call fcn.00402640
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x4173d1
mov eax, dword [edi + 0x44]
lea esp, [ebp - 0xc]
mov ebx, eax
and ebx, 0xffff
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
or word [ebp - 0x12], 2
mov eax, dword [edi + 0x64]
cmp edx, 2
mov dword [ebp - 0x10], eax
jne 0x4171da
mov eax, dword [edi + 0x58]
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0x4c]
push ebx
push 7
push 8
push eax
call fcn.00443fd0
mov ecx, dword [ebp - 0x54]
add esp, 0x10
mov dword [ebp - 0x4c], 0x4c8048
test ecx, ecx
je 0x4172be
xor esi, esi
xor ebx, ebx
nop
mov edx, dword [edi + 0x54]
mov eax, ebx
add eax, edx
inc esi
add ebx, 0x3c
mov edx, dword [eax + 0x2c]
add eax, 4
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], edx
push eax
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00444ce0
add esp, 0x10
cmp esi, dword [ebp - 0x54]
jne 0x417290
mov eax, dword [ebp - 0x44]
lea edx, [ebp - 0x38]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
mov word [ebp - 0x38], 0x10
mov eax, dword [edi + 0x68]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x2c], eax
push ebx
push 0x10
push edx
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax]
push ecx
call fcn.00402640
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x4173fc
mov edx, dword [ebp - 0x50]
test edx, edx
je 0x417378
xor esi, esi
xor edi, edi
jmp 0x41731d
inc esi
add edi, 0xc
cmp esi, dword [ebp - 0x50]
je 0x4173f5
mov eax, dword [ebp - 0x48]
mov edx, dword [eax + esi*8 + 4]
mov eax, dword [edx + 0x28]
mov dword [ebp - 0x28], eax
mov eax, dword [edx + 0x30]
mov word [ebp - 0x24], ax
mov al, byte [edx + 0x33]
mov byte [ebp - 0x21], al
mov al, byte [edx + 0x32]
mov byte [ebp - 0x22], al
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x20], eax
push eax
lea eax, [ebp - 0x28]
push 0xc
push eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
push eax
call fcn.00402640
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x417310
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x28
push 1
push str.ERROR:_out_of_memory_creating_Res_value_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
sub esp, 0xc
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0x4c8048
push eax
call fcn.004443a0
lea eax, [ebp - 0x4c]
mov dword [esp], eax
call fcn.00444210
mov eax, ebx
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x2d
push 1
push str.ERROR:_out_of_memory_creating_ResTable_entry_n
call sub.msvcrt.dll_fwrite
mov eax, ebx
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
or word [ebp - 0x12], 1
jmp 0x4171c3
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x28
push 1
push str.ERROR:_out_of_memory_creating_Res_value_n
call sub.msvcrt.dll_fwrite
mov eax, ebx
add esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebx, edi
jmp 0x417378
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push eax
push 0x2d
push 1
push str.ERROR:_out_of_memory_creating_ResTable_entry_n
call sub.msvcrt.dll_fwrite
add esp, 0x10
jmp 0x417378