Function at 0x40a5c0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x254
mov eax, dword [0x5b0c20]
xor eax, esp
mov dword [esp + 0x250], eax
push esi
mov esi, dword [esp + 0x25c]
push edi
xor edi, edi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], edi
cmp esi, edi
jne 0x40a608
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x250]
xor ecx, esp
call fcn.00524d83
add esp, 0x254
ret
cmp dword [esi + 0x2aec], edi
je 0x40a5ef
mov eax, dword [esi + 0x734]
mov ecx, dword [eax + 8]
push ebx
push ecx
push esi
call fcn.0044e340
add esp, 8
call fcn.0044b8f0
mov ebx, eax
cmp ebx, edi
jne 0x40a676
cmp dword [0x5b2ebc], edi
je 0x40a7df
mov edx, dword [0x5b2ec0]
push 1
push 0x3f58
mov dword [esp + 0x2c], 1
mov dword [esp + 0x34], edx
call fcn.00525178
lea ecx, [esp + 0x2c]
add esp, 8
mov dword [esp + 0x20], eax
mov dword [eax + 0x734], ecx
mov dword [eax + 0x35c], 0x1000
mov ebx, eax
push ebp
mov ebp, dword [ebx + 0x734]
push 0x1000
add ebp, 8
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
call fcn.00401bb0
mov edi, eax
add esp, 4
test edi, edi
je 0x40a7b1
mov eax, dword [ebx + 0x35c]
push 0
push edi
push eax
lea edx, [esp + 0x28]
push edx
push eax
mov eax, dword [ebp]
push eax
call fcn.00413640
add esp, 0x18
test eax, eax
je 0x40a799
mov edx, dword [esi + 0x734]
mov eax, dword [edx + 8]
push 0
push 0x10
lea ecx, [esp + 0x50]
push ecx
push eax
call fcn.0044b6b0
add esp, 0x10
test eax, eax
je 0x40a6ec
mov ecx, dword [esp + 0x48]
mov dword [edi + 0x1a8], ecx
mov edx, dword [esi + 0x2aec]
mov ax, word [edx + 0x38]
mov word [edi + 0x1ae], ax
mov ecx, dword [esi + 0x2aec]
mov dx, word [ecx + 0x3a]
mov word [edi + 0x1b0], dx
mov eax, dword [esi + 0x2aec]
mov cx, word [eax + 0x3c]
mov word [edi + 0x1b2], cx
mov dl, byte [esi + 0x3b1c]
mov byte [edi + 0x1ac], dl
xor eax, eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov ebx, dword [ebx + 0x35c]
mov ecx, dword [ebp]
push edi
push ebx
lea eax, [esp + 0x24]
push eax
push ebx
push ecx
call fcn.004136f0
add esp, 0x14
test eax, eax
je 0x40a799
push esi
call fcn.00407e40
push eax
add esi, 2
push esi
lea edx, [esp + 0x64]
push 0x5516e0
push edx
call fcn.00525f70
add esp, 0x14
push 0
push 0
push 3
push 0
push 7
push 0xc0000000
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x40a7f9
mov dword [esp + 0x14], 0
mov esi, dword [esp + 0x14]
push edi
call fcn.00401bc0
add esp, 4
test esi, esi
je 0x40a7b1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x24]
pop ebp
test eax, eax
je 0x40a7c3
push eax
call fcn.005251b8
add esp, 4
mov eax, dword [esp + 0x14]
pop ebx
pop edi
pop esi
mov ecx, dword [esp + 0x250]
xor ecx, esp
call fcn.00524d83
add esp, 0x254
ret
mov ecx, dword [esp + 0x25c]
pop ebx
pop edi
pop esi
xor ecx, esp
xor eax, eax
call fcn.00524d83
add esp, 0x254
ret
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0x800
push esi
call ebp
cmp eax, 0x800
jne 0x40a79d
push 0x2000
push 0
push 0x5bf8e0
call fcn.00526520
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
add esp, 0xc
push 0
lea ecx, [esp + 0x14]
push ecx
push 0x800
push 0x5bf8e0
push esi
call ebx
test eax, eax
je 0x40a79d
cmp dword [esp + 0x10], 0x800
jne 0x40a79d
push 0
push 0
push 0x1094
push esi
call ebp
cmp eax, 0x1094
jne 0x40a79d
push 0
lea edx, [esp + 0x14]
push edx
push 0x84
push 0x5bf8e0
push esi
call ebx
test eax, eax
je 0x40a79d
cmp dword [esp + 0x10], 0x84
jne 0x40a79d
mov dword [esp + 0x18], 1
jmp 0x40a79d