Function at 0x40d9a0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
mov eax, dword [ebp + 0x14c]
mov ebx, dword [eax + 0x2a]
mov eax, dword [ebp + 0x190]
imul ebx, ebx, 0x1c
add ebx, 8
test eax, eax
mov dword [esp + 8], 0
jne 0x40d9d2
pop ebp
xor eax, eax
pop ebx
add esp, 0x20
ret
push 0
push 0x4000000
push 2
push 0
push 0
push 0xc0000000
push str._attr_
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x10], eax
jne 0x40da02
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 8], eax
push esi
push edi
push ebx
call fcn.0042a10c
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x14], edi
jne 0x40da21
mov dword [esp + 0x10], 8
jmp 0x40da34
mov ecx, ebx
mov edx, ecx
shr ecx, 2
or eax, 0xffffffff
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
lea edi, [ebx + 8]
push edi
mov dword [esp + 0x2c], edi
call fcn.0042a10c
mov esi, eax
add esp, 4
test esi, esi
mov dword [esp + 0x20], esi
jne 0x40da58
mov dword [esp + 0x10], 8
jmp 0x40da6d
mov ecx, edi
mov edx, ecx
shr ecx, 2
or eax, 0xffffffff
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esi], ebx
jne 0x40dbe7
mov edx, 8
cmp ebx, edx
jae 0x40da91
mov dword [esp + 0x10], 0x7a
jmp 0x40dbe7
mov eax, dword [ebp + 0x190]
mov edi, dword [eax]
mov ecx, dword [esp + 0x14]
mov dword [ecx], edi
mov eax, dword [eax + 4]
mov dword [ecx + 4], eax
mov edi, ecx
mov ecx, dword [ebp + 0x190]
mov eax, dword [ecx + 8]
add edi, 8
test eax, eax
mov dword [esp + 0x1c], edi
mov dword [esp + 0x24], eax
je 0x40db05
mov edx, dword [ebp + 0x14c]
mov eax, dword [edx + 0x2a]
shl eax, 2
lea edx, [eax + 8]
cmp edx, ebx
jbe 0x40dadf
mov dword [esp + 0x10], 0x7a
jmp 0x40dbe7
mov esi, dword [esp + 0x24]
mov ecx, eax
mov ebp, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [esp + 0x34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add edi, eax
mov dword [esp + 0x1c], edi
mov eax, dword [ebp + 0x190]
mov eax, dword [eax + 0xc]
test eax, eax
mov dword [esp + 0x24], eax
je 0x40db57
mov ecx, dword [ebp + 0x14c]
mov eax, dword [ecx + 0x2a]
shl eax, 3
add edx, eax
cmp edx, ebx
jbe 0x40db35
mov dword [esp + 0x10], 0x7a
jmp 0x40dbe7
mov esi, dword [esp + 0x24]
mov ecx, eax
mov ebp, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
mov ebp, dword [esp + 0x34]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
mov esi, dword [esp + 0x20]
add edi, eax
mov eax, dword [ebp + 0x190]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x40db94
mov ecx, dword [ebp + 0x14c]
mov ecx, dword [ecx + 0x2a]
shl ecx, 4
add edx, ecx
cmp edx, ebx
jbe 0x40db80
mov dword [esp + 0x10], 0x7a
jmp 0x40dbe7
mov esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x20]
push 0
lea ecx, [esp + 0x38]
push ecx
push edx
mov edx, dword [esp + 0x20]
push edx
lea eax, [esp + 0x34]
push eax
lea ecx, [esi + 8]
push ecx
mov dword [esp + 0x4c], 0
call fcn.0040f730
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x3c]
add esp, 0x18
push 0
lea eax, [esp + 0x30]
push eax
push edi
push esi
push ecx
mov dword [esi + 4], edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp edi, dword [esp + 0x2c]
je 0x40dbe7
mov dword [esp + 0x10], 0x70
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40dbf8
push eax
call fcn.0042a11e
add esp, 4
push esi
call fcn.0042a11e
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
jne 0x40dc84
mov eax, dword [esp + 0x38]
test eax, eax
je 0x40dc62
lea edx, [esp + 0x34]
push edx
push str._attr_
push ebp
call fcn.0040afd0
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40dc57
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0xc]
test ecx, ecx
jbe 0x40dc57
mov ecx, dword [esp + 0x18]
push 0
push 0
push 0
push SysReAllocString
push str._attr_
push esi
push ecx
push ebp
call fcn.0040d020
add esp, 0x20
mov dword [esp + 0x10], eax
push esi
call fcn.0040b330
add esp, 4
jmp 0x40dc84
mov edx, dword [esp + 0x18]
push 0
push 0
push 0
push SysReAllocString
push str._attr_
push edx
push ebp
call fcn.0040c6c0
add esp, 0x1c
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x18]
cmp eax, 0xffffffff
pop edi
pop esi
je 0x40dc96
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 8]
pop ebp
pop ebx
add esp, 0x20
ret