Function at 0x40471a
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x406014]
xor eax, ebp
mov dword [ebp - 4], eax
movzx eax, word [0x40652c]
push ebx
push esi
movzx esi, word [0x4064f8]
mov dword [ebp - 0x34], ecx
movzx ecx, word [0x4064f0]
push edi
lea eax, [eax + esi*2]
mov byte [ebp - 0x25], dl
lea ebx, [esi*8 + 0x10]
lea edi, [ebx + eax*8]
movzx eax, word [0x406504]
lea eax, [eax + ecx*2]
movzx ecx, word [0x40650c]
lea esi, [edi + eax*8]
shl ecx, 4
mov eax, dword [0x4064fc]
add ecx, esi
add eax, 3
mov dword [ebp - 0x48], ecx
add eax, ecx
and eax, 0xfffffffc
mov ecx, eax
mov dword [ebp - 0x44], eax
call fcn.00402ad6
mov edx, eax
mov cx, word [0x4064e0]
xor eax, eax
mov dword [ebp - 0x38], edx
and dword [edx], 0
and dword [edx + 4], 0
mov dword [edx + 8], eax
mov ax, word [0x4064dc]
mov word [edx + 0xe], ax
lea eax, [edx + 0x10]
mov dword [ebp - 0x30], eax
lea eax, [edx + ebx]
mov ebx, dword [ebp - 0x38]
mov dword [ebp - 0x2c], eax
lea eax, [edx + edi]
mov dword [ebp - 0x40], eax
lea eax, [edx + esi]
mov esi, dword [ebp - 0x48]
mov word [edx + 0xc], cx
mov edx, esi
push dword [0x406524]
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
push ecx
mov ecx, ebx
call fcn.0040465d
push dword [0x4064ec]
lea eax, [ebp - 0x3c]
mov edx, esi
push eax
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
push eax
push ecx
mov ecx, ebx
call fcn.0040465d
mov edi, dword [0x406528]
jmp 0x40482f
lea ecx, [edi + 0xc]
movzx eax, word [ecx]
lea esi, [eax*2 + 2]
push esi
push ecx
push ebx
call sub.VCRUNTIME140_CLR0400.dll_memcpy
mov edi, dword [edi + 4]
add esp, 0xc
add ebx, esi
test edi, edi
jne 0x404814
mov esi, dword [ebp - 0x34]
mov dl, 1
mov ecx, esi
call fcn.00402c1b
push esi
mov ebx, eax
call dword [sym.imp.ucrtbase_clr0400.dll__wcsdup]
cmp byte [ebp - 0x25], 0
pop ecx
mov ecx, dword [ebp + 8]
mov dword [0x406090], ecx
mov cx, word [0x4064cc]
mov dword [0x4064d0], eax
mov word [0x40608c], cx
je 0x40487e
mov eax, 0x80000000
or dword [0x406074], eax
or dword [0x406128], eax
mov edx, 0x8c
mov ecx, ebx
push 0
mov dword [0x4060b4], edx
call fcn.00402caf
push ecx
push dword [0x406520]
call fcn.00401c8a
push ecx
push dword [0x4064e8]
call fcn.00401c8a
push ecx
push dword [0x4064e4]
call fcn.00401c8a
mov edi, dword [0x4064d8]
mov ecx, edi
call fcn.00401c3c
mov esi, dword [sym.imp.ucrtbase_clr0400.dll_fwrite]
test al, al
je 0x4048f1
mov esi, dword [edi + 0x12c]
push ebx
push esi
push 1
push dword [edi]
call dword [sym.imp.ucrtbase_clr0400.dll_fwrite]
add esp, 0x10
cmp eax, esi
je 0x4048eb
call fcn.00402d02
mov esi, dword [sym.imp.ucrtbase_clr0400.dll_fwrite]
mov ecx, ebx
call fcn.00402ce4
sub eax, dword [0x4060b4]
mov dword [0x4060b0], eax
test al, 1
je 0x40491f
push ebx
push 1
push 1
push 0x4014a4
call esi
add esp, 0x10
cmp eax, 1
jne 0x404d71
mov ecx, ebx
call fcn.00402ce4
mov dx, word [0x40650c]
mov ecx, dword [ebp - 0x44]
mov dword [0x406060], ecx
add ecx, eax
mov dword [0x406064], eax
movzx eax, dx
mov word [0x406070], dx
imul edx, eax, 0xa
mov dword [0x406068], ecx
push 0
add edx, ecx
mov ecx, ebx
mov dword [0x406118], edx
call fcn.00402caf
mov edi, dword [0x406510]
jmp 0x4049da
mov ecx, dword [edi + 0x18]
cmp dword [ecx + 0xc], 0
jne 0x4049c9
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 4]
push 0
call fcn.00402caf
mov ecx, ebx
call fcn.00402ce4
mov ecx, dword [edi + 0x18]
mov edx, ebx
sub eax, dword [0x406118]
mov dword [ecx + 0xc], eax
mov ecx, dword [edi + 0x18]
push dword [ecx + 0x10]
mov ecx, dword [ecx + 4]
call fcn.00402d12
mov eax, dword [edi + 0x18]
mov eax, dword [eax + 0x10]
neg eax
and eax, 7
mov dword [ebp - 0x34], eax
je 0x4049c9
push ebx
push eax
push 1
push 0x4014a4
call esi
add esp, 0x10
cmp eax, dword [ebp - 0x34]
jne 0x404d71
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
add ecx, dword [ebp - 0x38]
mov eax, dword [eax + 0x10]
mov dword [ecx + 4], eax
mov edi, dword [edi]
test edi, edi
jne 0x404969
mov ecx, ebx
call fcn.00402ce4
sub eax, dword [0x406118]
mov dword [0x406114], eax
test al, 1
je 0x404a0c
push ebx
push 1
push 1
push 0x4014a4
call esi
add esp, 0x10
cmp eax, 1
jne 0x404d71
mov ecx, ebx
call fcn.00402ce4
push ebx
xor ecx, ecx
mov dword [0x406094], eax
cmp dword [0x4064d4], ecx
movzx eax, word [0x40650c]
push 0x12
pop edi
setne cl
add eax, 8
push edi
add eax, ecx
push 1
push 0x4060c8
mov dword [0x406098], eax
call esi
add esp, 0x10
cmp eax, edi
jne 0x404d71
push ebx
push edi
push 1
push str._feat.00
call esi
add esp, 0x10
cmp eax, edi
jne 0x404d71
xor eax, eax
lea edi, [ebp - 0x24]
stosd dword es:[edi], eax
push ebx
push 0x12
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [0x4060b0]
xor edi, edi
inc edi
mov dword [ebp - 0x24], eax
mov ax, word [0x4060c0]
push edi
push 0x40612c
mov word [ebp - 0x20], ax
call esi
add esp, 0x10
cmp eax, 0x12
jne 0x404d71
push ebx
push eax
lea eax, [ebp - 0x24]
push edi
push eax
call esi
add esp, 0x10
cmp eax, 0x12
jne 0x404d71
mov eax, dword [0x406060]
push ebx
push 0x12
mov dword [ebp - 0x24], eax
mov ax, word [0x406070]
push edi
push str..rsrc_01
mov word [ebp - 0x20], ax
call esi
add esp, 0x10
cmp eax, 0x12
jne 0x404d71
push ebx
push eax
lea eax, [ebp - 0x24]
push edi
push eax
call esi
add esp, 0x10
cmp eax, 0x12
jne 0x404d71
mov eax, dword [0x406114]
push ebx
push 0x12
mov dword [ebp - 0x24], eax
mov ax, word [0x406124]
push edi
push 0x4060f0
mov word [ebp - 0x20], ax
call esi
add esp, 0x10
cmp eax, 0x12
jne 0x404d71
push ebx
push eax
lea eax, [ebp - 0x24]
push edi
push eax
call esi
add esp, 0x10
cmp eax, 0x12
jne 0x404d71
mov edi, dword [0x406510]
jmp 0x404b84
mov eax, dword [edi + 0x18]
mov eax, dword [eax + 0xc]
and eax, 0xffffff
push eax
push 0x401758
lea eax, [ebp - 0x10]
push 9
push eax
call fcn.0040300e
mov eax, dword [ebp - 0x10]
mov dword [0x406078], eax
mov eax, dword [ebp - 0xc]
mov dword [0x40607c], eax
mov eax, dword [edi + 0x18]
push ebx
push 0x12
push 1
mov eax, dword [eax + 0xc]
push 0x406078
mov dword [0x406080], eax
call esi
add esp, 0x20
cmp eax, 0x12
jne 0x404d71
mov edi, dword [edi]
test edi, edi
jne 0x404b33
mov ecx, dword [0x4064d4]
mov dword [ebp - 0x2c], 8
test ecx, ecx
je 0x404d0f
call fcn.00402b72
mov edi, eax
mov dword [ebp - 0x30], eax
lea edx, [edi + 1]
mov cl, byte [edi]
inc edi
test cl, cl
jne 0x404baa
sub edi, edx
cmp edi, 8
ja 0x404bcb
push edi
push eax
push 0x406154
call sub.VCRUNTIME140_CLR0400.dll_memcpy
add esp, 0xc
xor edi, edi
jmp 0x404bd5
mov dword [0x406158], 4
push ebx
push 0x12
push 1
push 0x406154
call esi
add esp, 0x10
cmp eax, 0x12
jne 0x404d71
test edi, edi
je 0x404d0c
push ebx
lea eax, [edi + 5]
push 4
mov dword [ebp - 0x34], eax
lea eax, [ebp - 0x34]
push 1
push eax
call esi
add esp, 0x10
cmp eax, 4
jne 0x404d71
push ebx
lea esi, [edi + 1]
mov edi, dword [ebp - 0x30]
push esi
push 1
push edi
call dword [sym.imp.ucrtbase_clr0400.dll_fwrite]
add esp, 0x10
cmp eax, esi
je 0x404c2f
call fcn.00402d02
mov esi, dword [sym.imp.ucrtbase_clr0400.dll_fwrite]
test edi, edi
je 0x404c41
push edi
call dword [sym.imp.ucrtbase_clr0400.dll_free]
pop ecx
mov ecx, ebx
call fcn.00402ce4
push eax
push ebx
call dword [sym.imp.ucrtbase_clr0400.dll__fileno]
pop ecx
push eax
call dword [sym.imp.ucrtbase_clr0400.dll__chsize]
pop ecx
pop ecx
push 0
xor edx, edx
mov ecx, ebx
call fcn.00402caf
push ebx
xor edi, edi
push 0x14
inc edi
push edi
push 0x40608c
call esi
add esp, 0x10
cmp eax, 0x14
jne 0x404d71
push ebx
push 0x28
push edi
push str..debug_S
call esi
add esp, 0x10
cmp eax, 0x28
jne 0x404d71
push ebx
push eax
push edi
push 0x406050
call esi
add esp, 0x10
cmp eax, 0x28
jne 0x404d71
push ebx
push eax
push edi
push str..rsrc_02
call esi
add esp, 0x10
cmp eax, 0x28
jne 0x404d71
mov edx, dword [0x406064]
mov ecx, ebx
push 0
call fcn.00402caf
mov edi, dword [ebp - 0x44]
push ebx
push edi
push 1
push dword [ebp - 0x38]
call esi
add esp, 0x10
cmp eax, edi
je 0x404ce9
call fcn.00402d02
mov edx, dword [0x406068]
mov ecx, ebx
push 0
call fcn.00402caf
mov ax, word [0x4064c8]
mov edi, dword [0x406510]
mov word [0x40651c], ax
jmp 0x404d52
mov edi, dword [ebp - 0x30]
push ebx
push 4
push 1
push 0x4014a4
call esi
add esp, 0x10
cmp eax, 4
je 0x404c35
jmp 0x404d71
mov eax, dword [edi + 0x14]
mov dword [0x406514], eax
mov eax, dword [ebp - 0x2c]
push 0xa
mov dword [0x406518], eax
inc eax
push 1
push 0x406514
mov dword [ebp - 0x2c], eax
call esi
add esp, 0x10
cmp eax, 0xa
jne 0x404d71
mov edi, dword [edi]
push ebx
test edi, edi
jne 0x404d29
call dword [sym.imp.ucrtbase_clr0400.dll_fclose]
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004050da
mov esp, ebp
pop ebp
ret 4
call fcn.00402bd4
push 0x452
call fcn.00402dae
int3