Function at 0x40c7c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x808
push ebx
mov ebx, dword [0x4a9ba8]
xor eax, eax
push ebp
push esi
mov esi, dword [0x4922b4]
mov ecx, ebx
push edi
mov edi, 0x46df45
mov dword [esp + 0x18], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
call fcn.00447220
mov ebp, eax
test ebp, ebp
je 0x40cafc
mov ecx, esi
call fcn.0042e1d0
test eax, eax
je 0x40caee
mov ebx, dword [eax + 0x1c]
test ebx, ebx
je 0x40caea
lea edx, [esp + 0x430]
mov ecx, edi
sub edx, edi
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x40c820
test byte [ebx + 0x24], 1
je 0x40c853
lea edi, [esp + 0x430]
dec edi
jmp 0x40c840
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40c840
mov ax, word [0x46de20]
mov word [edi], ax
mov edx, dword [ebx]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x40c857
lea edi, [esp + 0x430]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40c868
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebx + 8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
test edx, edx
je 0x40c8cd
cmp byte [edx], al
je 0x40c8cd
lea edi, [esp + 0x430]
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40c891
mov ax, word [0x46de44]
mov esi, edx
mov word [edi], ax
mov al, byte [edx]
inc edx
test al, al
jne 0x40c8a6
lea edi, [esp + 0x430]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40c8b7
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x20]
cmp eax, 0xffffffff
jle 0x40c953
push 0xa
lea ecx, [esp + 0x38]
push ecx
push eax
call fcn.0044e90f
lea edi, [esp + 0x43c]
add esp, 0xc
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40c8f1
mov ax, word [0x46de1c]
lea edx, [esp + 0x34]
mov word [edi], ax
mov esi, edx
lea ebx, [ebx]
mov al, byte [edx]
inc edx
test al, al
jne 0x40c910
lea edi, [esp + 0x430]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40c921
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x430]
dec edi
nop
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x40c940
mov ax, word [0x46ddf0]
mov word [edi], ax
mov eax, dword [ebx + 0x18]
mov ebx, dword [ebx + 4]
test ebx, ebx
je 0x40ca0f
cmp dword [ebx + 0x18], eax
jne 0x40ca0f
cmp dword [esp + 0x10], 0
jne 0x40c9c0
xor eax, eax
mov cl, byte [eax + str.StructureUnion]
lea eax, [eax + 1]
mov byte [esp + eax + 0x47], cl
test cl, cl
jne 0x40c973
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x1c]
push 0
push eax
push 0xf
lea eax, [esp + 0x54]
mov byte [esp + 0x62], 0xa
push eax
push ebp
call esi
push 0
lea eax, [esp + 0x24]
mov dword [esp + 0x14], 1
push eax
push 4
mov edi, 0x46e08c
push edi
push ebp
mov dword [esp + 0x28], edi
call esi
jmp 0x40c9ca
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x14]
lea edx, [esp + 0x430]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40c9d4
sub edx, ecx
xor ecx, ecx
nop
mov al, byte [esp + ecx + 0x430]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x47], al
test al, al
jne 0x40c9e0
push 0
lea eax, [esp + 0x28]
mov byte [esp + edx + 0x4c], 0xa
push eax
lea eax, [edx + 1]
push eax
lea eax, [esp + 0x54]
push eax
push ebp
call esi
jmp 0x40c814
lea edx, [esp + 0x430]
lea ecx, [edx + 1]
lea esp, [esp]
mov al, byte [edx]
inc edx
test al, al
jne 0x40ca20
sub edx, ecx
xor ecx, ecx
cmp dword [esp + 0x10], ecx
je 0x40cab0
jmp 0x40ca40
mov al, byte [esp + ecx + 0x430]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x47], al
test al, al
jne 0x40ca40
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x28]
push 0
push eax
lea eax, [edx + 1]
mov byte [esp + edx + 0x50], 0xa
push eax
lea eax, [esp + 0x54]
push eax
push ebp
call esi
xor ecx, ecx
mov al, byte [ecx + str.EndStructureUnion]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x47], al
test al, al
jne 0x40ca72
push 0
lea eax, [esp + 0x30]
mov byte [esp + 0x5d], 0xa
push eax
push 0x12
lea eax, [esp + 0x54]
push eax
push ebp
call esi
xor eax, eax
mov edi, 0x46df45
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edi
jmp 0x40cae2
mov al, byte [esp + ecx + 0x430]
lea ecx, [ecx + 1]
mov byte [esp + ecx + 0x47], al
test al, al
jne 0x40cab0
push 0
lea eax, [esp + 0x34]
mov byte [esp + edx + 0x4c], 0xa
push eax
lea eax, [edx + 1]
push eax
lea eax, [esp + 0x54]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x14]
test ebx, ebx
jne 0x40c814
mov ebx, dword [esp + 0x18]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, str.File__s_successfully_created._n
jmp 0x40cb01
mov eax, str.Cant_create_file__s._n
push ebx
push eax
call fcn.00412ad0
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x808
ret