Function at 0x41fdb9
Capabilities:
Write file on windows

Disassembly:
push 0x50
mov eax, 0x470d17
call fcn.00434a2f
mov esi, ecx
mov ecx, dword [esi]
and dword [ebp - 4], 0
push str.Extracting_icon_resources.
push 2
call fcn.0040361d
push 0xe
push 0x84
lea eax, [ebp - 0x20]
mov ecx, esi
push eax
call fcn.0042002e
test al, al
je 0x41fdf6
mov bl, 1
jmp 0x41ffa6
push dword [ebp - 0x14]
call fcn.0045030b
push dword [ebp - 0x14]
mov dword [ebp - 0x54], eax
push dword [ebp - 0x18]
push eax
call fcn.0044db70
add esp, 0x10
lea eax, [ebp + 8]
cmp dword [ebp + 0x1c], 8
cmovae eax, dword [ebp + 8]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0x48]
lea eax, [ebp - 0x58]
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x50]
push eax
call fcn.0041fce8
cmp dword [ebp - 0x58], 0xffffffff
mov byte [ebp - 4], 1
jne 0x41fe87
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
mov ecx, dword [esi]
cmovae eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push str.Failed_to_create_icon_file_in_path___.
push 4
call fcn.0040378a
push dword [ebp - 0x54]
call fcn.00450306
pop ecx
jmp 0x420027
mov eax, dword [ebp - 0x54]
movzx eax, word [eax + 4]
push eax
push dword [ebp - 0x58]
call fcn.0042009f
pop ecx
pop ecx
test al, al
je 0x41feb0
mov ecx, dword [esi]
push str.Failed_to_write_ICO_header.
push 4
call fcn.0040361d
jmp 0x420027
mov ecx, dword [ebp - 0x54]
and dword [ebp - 0x4c], 0
movzx eax, word [ecx + 4]
mov edi, eax
shl edi, 4
add edi, 6
test eax, eax
je 0x41ff41
xor ebx, ebx
mov al, byte [ebx + ecx + 6]
mov byte [ebp - 0x20], al
mov al, byte [ebx + ecx + 7]
mov byte [ebp - 0x1f], al
mov al, byte [ebx + ecx + 8]
mov byte [ebp - 0x1e], al
mov al, byte [ebx + ecx + 9]
mov byte [ebp - 0x1d], al
mov ax, word [ebx + ecx + 0xa]
mov word [ebp - 0x1c], ax
mov ax, word [ebx + ecx + 0xc]
mov word [ebp - 0x1a], ax
mov eax, dword [ebx + ecx + 0xe]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x5c]
push 0
push eax
push 0x10
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], edi
add edi, dword [ebx + ecx + 0xe]
push eax
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x41ffd5
cmp dword [ebp - 0x5c], 0x10
jne 0x41ffbc
mov ecx, dword [ebp - 0x54]
add ebx, 0xe
mov edx, dword [ebp - 0x4c]
inc edx
mov dword [ebp - 0x4c], edx
movzx eax, word [ecx + 4]
cmp edx, eax
jl 0x41fec9
xor eax, eax
xor edi, edi
cmp ax, word [ecx + 4]
jae 0x41ff9c
xor ebx, ebx
movzx eax, word [ebx + ecx + 0x12]
mov ecx, esi
push 3
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.0042002e
test al, al
jne 0x420027
push 0
lea eax, [ebp - 0x5c]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [ebp - 0x58]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x420007
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x5c], eax
jne 0x41ffee
mov ecx, dword [ebp - 0x54]
inc edi
add ebx, 0xe
movzx eax, word [ecx + 4]
cmp edi, eax
jl 0x41ff4d
xor bl, bl
lea ecx, [ebp - 0x48]
call fcn.0040779e
push 0
push 1
lea ecx, [ebp + 8]
call fcn.0040a71d
mov al, bl
call fcn.004349d9
ret 0x18
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push str.Bytes_written_to_file____does_not_match_expected_size.
jmp 0x42001e
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push str.Couldnt_write_to_file___._Error_code_.
jmp 0x42001e
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push str.Icon_data_written_to_file____does_not_match_expected_size.
jmp 0x42001e
cmp dword [ebp + 0x1c], 8
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x4c]
push eax
push str.Could_not_write_icon_data_to_file___
mov ecx, dword [esi]
push 4
call fcn.0040378a
mov bl, 1
jmp 0x41ff9e