Function at 0x403900
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4202e6
mov eax, dword fs:[0]
push eax
sub esp, 0x918
mov eax, dword [0x427040]
xor eax, esp
mov dword [esp + 0x910], eax
push ebx
push esi
push edi
mov eax, dword [0x427040]
xor eax, esp
push eax
lea eax, [esp + 0x928]
mov dword fs:[0], eax
mov ebx, ecx
push ebx
lea esi, [esp + 0x58]
call fcn.00402a30
xor esi, esi
mov dword [esp + 0x34], 0xf
mov dword [esp + 0x30], esi
mov byte [esp + 0x20], 0
mov dword [esp + 0x930], esi
cmp dword [esp + 0x54], 3
jne 0x403c64
push 0x1ff
lea eax, [esp + 0x721]
push esi
push eax
mov byte [esp + 0x728], 0
call fcn.00413e90
add esp, 0xc
push 0xa
push str._GA__Type_
lea ecx, [esp + 0x24]
call fcn.00401af0
mov ecx, dword [esp + 0x54]
push ecx
push 0x422ec8
mov ecx, 0x200
lea edi, [esp + 0x724]
call fcn.00401ee0
mov eax, edi
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4039c2
sub eax, edx
push eax
lea edx, [esp + 0x720]
push edx
lea eax, [esp + 0x24]
call fcn.00404e50
push 7
push str.__Type_
lea eax, [esp + 0x24]
call fcn.00404e50
push 0xa
push str._MustSend_
lea eax, [esp + 0x24]
call fcn.00404e50
cmp byte [esp + 0x58], 0
push 1
lea eax, [esp + 0x20]
je 0x403a13
push 0x422ecc
jmp 0x403a18
push 0x422d4c
call fcn.00404e50
push 0xb
push str.__MustSend_
lea eax, [esp + 0x24]
call fcn.00404e50
push 8
push str._SetTid_
lea eax, [esp + 0x24]
call fcn.00404e50
cmp byte [esp + 0x59], 0
push 1
lea eax, [esp + 0x20]
je 0x403a51
push 0x422ecc
jmp 0x403a56
push 0x422d4c
call fcn.00404e50
push 9
push str.__SetTid_
lea eax, [esp + 0x24]
call fcn.00404e50
push 5
push str._Tid_
lea eax, [esp + 0x24]
call fcn.00404e50
lea eax, [esp + 0x5a]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x403a82
sub eax, edx
push eax
lea eax, [esp + 0x5e]
push eax
lea eax, [esp + 0x24]
call fcn.00404e50
push 6
push str.__Tid_
lea eax, [esp + 0x24]
call fcn.00404e50
push 8
push str._SetCid_
lea eax, [esp + 0x24]
call fcn.00404e50
cmp byte [esp + 0x15a], 0
push 1
lea eax, [esp + 0x20]
je 0x403ad3
push 0x422ecc
jmp 0x403ad8
push 0x422d4c
call fcn.00404e50
push 9
push str.__SetCid_
lea eax, [esp + 0x24]
call fcn.00404e50
push 5
push str._Cid_
lea eax, [esp + 0x24]
call fcn.00404e50
lea eax, [esp + 0x15b]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x403b07
sub eax, edx
push eax
lea ecx, [esp + 0x15f]
push ecx
lea eax, [esp + 0x24]
call fcn.00404e50
push 6
push str.__Cid_
lea eax, [esp + 0x24]
call fcn.00404e50
push 0xa
push str._Category_
lea eax, [esp + 0x24]
call fcn.00404e50
lea eax, [esp + 0x25b]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x403b50
sub eax, edx
push eax
lea edx, [esp + 0x25f]
push edx
lea eax, [esp + 0x24]
call fcn.00404e50
push 0xb
push str.__Category_
lea eax, [esp + 0x24]
call fcn.00404e50
push 8
push str._Action_
lea eax, [esp + 0x24]
call fcn.00404e50
lea eax, [esp + 0x2f1]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x403b97
sub eax, edx
push eax
lea eax, [esp + 0x2f5]
push eax
lea eax, [esp + 0x24]
call fcn.00404e50
push 9
push str.__Action_
lea eax, [esp + 0x24]
call fcn.00404e50
push 7
push str._Label_
lea eax, [esp + 0x24]
call fcn.00404e50
lea eax, [esp + 0x4e5]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x403be0
sub eax, edx
push eax
lea ecx, [esp + 0x4e9]
push ecx
lea eax, [esp + 0x24]
call fcn.00404e50
push 8
push str.__Label_
lea eax, [esp + 0x24]
call fcn.00404e50
push 7
push str._Value_
lea eax, [esp + 0x24]
call fcn.00404e50
lea eax, [esp + 0x6d9]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x403c27
sub eax, edx
push eax
lea edx, [esp + 0x6dd]
push edx
lea eax, [esp + 0x24]
call fcn.00404e50
push 8
push str.__Value_
lea eax, [esp + 0x24]
call fcn.00404e50
push 7
push str.__GA__r_n
lea eax, [esp + 0x24]
call fcn.00404e50
push 0xffffffffffffffff
mov edi, 7
lea eax, [ebx + 0x38]
push esi
lea ecx, [esp + 0x40]
mov dword [esp + 0x58], edi
mov dword [esp + 0x54], esi
mov word [esp + 0x44], si
call fcn.00404d90
push 0x11
push str.WindowsGA_OF.dat
lea ecx, [esp + 0x40]
mov byte [esp + 0x938], 1
call fcn.004052d0
mov eax, dword [esp + 0x3c]
mov ebx, 8
cmp dword [esp + 0x50], ebx
mov dword [esp + 0x14], vtable.FileControl.0
jae 0x403cb8
lea eax, [esp + 0x3c]
push esi
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.00407410
test al, al
jne 0x403d03
cmp dword [esp + 0x50], ebx
jb 0x403cdb
mov eax, dword [esp + 0x3c]
push eax
call fcn.004127aa
add esp, 4
mov dword [esp + 0x50], edi
mov dword [esp + 0x4c], esi
mov word [esp + 0x3c], si
cmp dword [esp + 0x34], 0x10
jb 0x403cfc
mov ecx, dword [esp + 0x20]
push ecx
call fcn.004127aa
add esp, 4
xor al, al
jmp 0x403ddd
cmp dword [esp + 0x34], 0x10
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x20]
mov ebx, eax
jae 0x403d18
lea edi, [esp + 0x20]
push eax
push edi
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
mov esi, dword [esp + 0x18]
jne 0x403d58
test ebx, ebx
je 0x403d58
push 2
xor ecx, ecx
push ecx
push ecx
xor eax, eax
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x403d58
push 0
lea edx, [esp + 0x14]
push edx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403d92
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x50], 8
jb 0x403d7a
mov eax, dword [esp + 0x3c]
push eax
call fcn.004127aa
add esp, 4
xor eax, eax
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], eax
mov word [esp + 0x3c], ax
jmp 0x403ce8
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x50], 8
jb 0x403db4
mov edx, dword [esp + 0x3c]
push edx
call fcn.004127aa
add esp, 4
xor eax, eax
cmp dword [esp + 0x34], 0x10
mov dword [esp + 0x50], 7
mov dword [esp + 0x4c], eax
mov word [esp + 0x3c], ax
jb 0x403ddb
mov eax, dword [esp + 0x20]
push eax
call fcn.004127aa
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x928]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x910]
xor ecx, esp
call fcn.0041288d
mov esp, ebp
pop ebp
ret