Function at 0x422a80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5ab018
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0xbc], eax
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0xd0]
mov dword fs:[0], eax
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x14], eax
xor esi, esi
mov dword [esp + 0xd8], esi
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push ecx
mov byte [esp + 0xe0], 1
call fcn.004d5430
mov edi, dword [esp + 0x1c]
add esp, 8
cmp dword [edi - 0xc], 0xf
jle 0x422b71
mov byte [esp + 0xd8], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x422b40
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd8], 0xffffffff
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422b67
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x80004005
jmp 0x423235
mov eax, dword [ebx + 0x3c]
add eax, 0x10
shl eax, 7
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], esi
push eax
lea ecx, [esp + 0x1c]
push ecx
mov byte [esp + 0xe0], 2
call fcn.00419050
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
push edx
push esi
push eax
call fcn.00580260
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
add esp, 0xc
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x10], eax
push 6
push str.Name:
lea ecx, [esp + 0x18]
push ecx
mov byte [esp + 0xe4], 3
call fcn.00403fc0
mov eax, dword [ebx + 0x4c]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x18]
push edx
call fcn.00403fc0
push 2
push 0x5bdf38
lea eax, [esp + 0x18]
push eax
call fcn.00403fc0
push 6
push str.Type:
lea ecx, [esp + 0x18]
push ecx
call fcn.00403fc0
mov eax, dword [ebx + 0x50]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea edx, [esp + 0x18]
push edx
call fcn.00403fc0
push 2
push 0x5bdf38
lea eax, [esp + 0x18]
push eax
call fcn.00403fc0
mov esi, dword [esp + 0x10]
mov eax, dword [esi - 0xc]
mov ecx, dword [esp + 0x18]
lea edi, [eax + eax + 2]
push edi
add ecx, 0x60
push esi
push ecx
mov dword [esp + 0x44], edi
call fcn.0057e7b0
add edi, 0x6f
and edi, 0xfffffff0
add esp, 0xc
cmp dword [ebx + 0x60], 0
mov dword [esp + 0x3c], edi
mov dword [ebx + 0x5c], 0x5d
je 0x422cf9
lea eax, [esi - 0x10]
mov byte [esp + 0xd8], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x422c8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0057832c
mov byte [esp + 0xdc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
add esp, 4
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x422cc4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd8], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422cef
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
jmp 0x423235
mov eax, dword [esp + 0x28]
mov esi, eax
mov dword [esp + 0x20], 0
push eax
lea ecx, [esp + 0x24]
push ecx
mov byte [esp + 0xe0], 4
call fcn.00419050
push esi
mov esi, dword [esp + 0x24]
push 0
push esi
call fcn.00580260
mov eax, dword [ebx + 0x3c]
add esp, 0xc
test eax, eax
lea edx, [eax + eax*4]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x50], eax
lea esi, [esi + edx*2]
mov dword [esp + 0x2c], 0
jbe 0x422ea8
xor edi, edi
mov dword [esp + 0x30], edi
jmp 0x422d57
mov edi, dword [esp + 0x30]
mov eax, dword [esp + 0x2c]
cmp eax, dword [ebx + 0x3c]
jae 0x422ee5
mov eax, dword [ebx + 0x38]
add eax, edi
mov eax, dword [eax]
lea ecx, [esp + 0x34]
push ecx
mov ecx, eax
call fcn.00407e10
mov edx, dword [esp + 0x2c]
mov byte [esp + 0xd8], 5
cmp edx, dword [ebx + 0x3c]
jae 0x422ee5
mov eax, dword [ebx + 0x38]
add eax, edi
mov eax, dword [eax + 4]
sub eax, 0x10
call fcn.00403ce0
lea edi, [eax + 0x10]
mov dword [esp + 0x24], edi
mov eax, dword [esp + 0x2c]
mov byte [esp + 0xd8], 6
cmp eax, dword [ebx + 0x3c]
jae 0x422ee5
mov eax, dword [ebx + 0x38]
add eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
fld dword [eax + 8]
mov eax, dword [edi - 0xc]
mov ecx, dword [ecx - 0xc]
fstp dword [esp + 0x24]
fld dword [esp + 0x24]
add al, al
mov byte [esp + 0x41], al
fstp dword [esp + 0x42]
mov eax, dword [esp + 0x4c]
mov edx, esi
sub edx, dword [esp + 0x20]
mov byte [esp + 0x40], cl
mov dword [esp + 0x46], edx
mov edx, dword [esp + 0x40]
mov dword [eax], edx
mov edx, dword [esp + 0x44]
mov dword [eax + 4], edx
mov dx, word [esp + 0x48]
mov word [eax + 8], dx
add eax, 0xa
mov dword [esp + 0x4c], eax
movzx eax, cl
push eax
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x38]
push eax
push esi
call fcn.0057e7b0
movzx eax, byte [esp + 0x4d]
add esi, dword [esp + 0x30]
add esp, 0xc
push eax
push edi
push esi
call fcn.0057e7b0
movzx eax, byte [esp + 0x4d]
add edi, 0xfffffff0
add esp, 0xc
add esi, eax
mov byte [esp + 0xd8], 5
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422e62
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov byte [esp + 0xd8], 4
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422e8a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add dword [esp + 0x30], 0xc
add eax, 1
cmp eax, dword [esp + 0x50]
mov dword [esp + 0x2c], eax
jb 0x422d53
mov edi, dword [esp + 0x3c]
mov eax, dword [esp + 0x20]
sub esi, eax
cmp dword [ebx + 0x60], 0
mov dword [ebx + 0x5c], 0x61
je 0x422eef
push eax
call fcn.0057832c
mov byte [esp + 0xdc], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x422c83
push 0x80070057
call fcn.00404550
mov ecx, dword [0x5fe650]
test ecx, ecx
je 0x422f1b
push 0xffffffffffffffff
push esi
push eax
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x34]
push edx
lea edx, [edi + eax]
push edx
call ecx
add esp, 0x14
test eax, eax
je 0x422f98
mov eax, dword [esp + 0x20]
push eax
call fcn.0057832c
mov byte [esp + 0xdc], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x422f4c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0057832c
mov byte [esp + 0xdc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x422f81
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd8], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
jmp 0x422b4e
push 0x5c
lea ecx, [esp + 0x68]
push 0
push ecx
call fcn.00580260
mov ecx, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x68], 0x7d1ea609
mov word [esp + 0x6c], 1
mov word [esp + 0x6e], 0
call fcn.00407e10
mov ecx, dword [esp + 0x14]
mov ecx, dword [ecx - 0xc]
mov eax, dword [eax]
push ecx
push eax
lea edx, [esp + 0x74]
push edx
call fcn.0057e7b0
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
add esp, 0xc
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x423005
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x54]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
lea edx, [esp + 0x7c]
push edx
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x80]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x84], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x94], eax
xor eax, eax
mov dword [esp + 0xa0], ecx
mov dword [esp + 0x88], edx
mov edx, dword [esp + 0x50]
mov dword [esp + 0xa4], esi
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0xac], eax
mov dword [esp + 0x8c], 1
mov dword [esp + 0x90], 0x60
mov dword [esp + 0xa8], edx
mov ecx, 0x17
lea esi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x18]
add eax, ecx
push eax
mov ecx, esi
xor eax, eax
call fcn.0040c5c0
xor edi, edi
add esp, 4
mov dword [esi + 0x48], eax
mov dword [esp + 0x38], edi
push edi
push 0x80
push 2
push edi
push 1
mov byte [esp + 0xec], 7
mov edx, dword [esp + 0x30]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x423151
call fcn.004129d0
test eax, eax
jge 0x423157
mov eax, dword [esp + 0x20]
push eax
call fcn.0057832c
mov byte [esp + 0xdc], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x423127
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call fcn.0057832c
mov byte [esp + 0xdc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x422f75
mov edi, eax
mov dword [esp + 0x38], edi
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x3c]
push 0
lea eax, [edx + ecx]
lea ecx, [esp + 0x28]
push ecx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x42317b
call fcn.004129d0
mov eax, dword [ebx + 0x50]
mov ecx, dword [ebx + 0x4c]
mov edx, dword [esp + 0x14]
push eax
push ecx
push edx
call fcn.004d5380
add esp, 0xc
test edi, edi
mov dword [ebx + 0x5c], 0x64
je 0x4231a2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x20]
push eax
call fcn.0057832c
mov byte [esp + 0xdc], 2
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4231d7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push esi
call fcn.0057832c
mov byte [esp + 0xdc], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x423208
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0xd8], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x423233
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0xd0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0xbc]
xor ecx, esp
call fcn.005787fd
mov esp, ebp
pop ebp
ret