Function at 0x4ad310
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4bb9d6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1b0
mov edx, ecx
push ebx
push ebp
push esi
mov eax, dword [edx + 4]
push edi
test eax, eax
mov dword [esp + 0x28], edx
je 0x4ad809
mov eax, dword [edx + 0x140]
test eax, eax
je 0x4ad809
mov eax, dword [esp + 0x1d0]
test eax, eax
jne 0x4ad367
mov al, byte [edx + 0x34]
test al, al
jne 0x4ad367
xor eax, eax
jmp 0x4ad815
mov edi, 0x4d7918
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x38]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
lea ebx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4db758
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
lea ebx, [esp + 0x2c]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x4db754
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [edx + 8]
push esi
mov dword [esp + 0x24], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x2800
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4ad409
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4ad815
mov edi, dword [esp + 0x28]
xor ebp, ebp
mov dword [esp + 0x10], 0x2800
mov eax, dword [edi + 0x138]
test eax, eax
je 0x4ad42c
mov ebp, 4
mov dword [ebx], 0xed02be01
mov eax, dword [esp + 0x1d0]
push 0
push 0x80
push 2
push 0
push 1
test eax, eax
push 0xc0000000
je 0x4ad44c
push eax
jmp 0x4ad450
lea ecx, [edi + 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
jne 0x4ad477
push ebx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4ad815
mov ecx, dword [edi + 0x2c]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x34], eax
jle 0x4ad694
test eax, eax
jl 0x4ad687
cmp eax, dword [edi + 0x2c]
jge 0x4ad687
mov edx, dword [edi + 0x30]
mov esi, dword [edx + eax*4]
test esi, esi
mov dword [esp + 0x24], esi
je 0x4ad683
mov eax, dword [esi]
test eax, eax
je 0x4ad543
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
add ecx, 5
add ecx, ebp
cmp ecx, eax
mov dword [esp + 0x18], ecx
jbe 0x4ad4f4
lea edi, [eax + 0x2800]
push edi
push ebx
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
test eax, eax
je 0x4ad710
mov dword [esp + 0x10], edi
mov ebx, eax
mov cx, word [esp + 0x30]
mov dl, byte [esp + 0x32]
add ebp, ebx
mov eax, ebp
mov word [eax], cx
or ecx, 0xffffffff
mov byte [eax + 2], dl
mov esi, dword [esi]
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebp + 3]
mov eax, ecx
mov ebp, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov dx, word [esp + 0x2c]
mov ecx, eax
and ecx, 3
mov al, byte [esp + 0x2e]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x24]
lea ecx, [ebx + ebp - 3]
mov word [ebx + ebp - 3], dx
mov byte [ecx + 2], al
mov edi, dword [esi + 0x10]
xor ecx, ecx
test edi, edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x18], ecx
jle 0x4ad677
mov edx, dword [esp + 0x10]
add edx, 0x2800
mov dword [esp + 0x1c], edx
test ecx, ecx
jl 0x4ad66a
cmp ecx, dword [esi + 0x10]
jge 0x4ad66a
mov eax, dword [esi + 0x14]
mov esi, dword [eax + ecx*4]
test esi, esi
mov dword [esp + 0x3c], esi
je 0x4ad666
mov edx, dword [esi]
test edx, edx
je 0x4ad666
mov eax, dword [esi + 4]
test eax, eax
je 0x4ad666
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, edx
mov eax, ecx
or ecx, 0xffffffff
mov dword [esp + 0x4c], eax
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x4c]
mov edx, ebp
not ecx
dec ecx
add edx, eax
mov eax, dword [esp + 0x10]
lea ecx, [ecx + edx + 4]
cmp ecx, eax
jle 0x4ad602
mov edx, dword [esp + 0x1c]
push edx
push ebx
call dword [sym.imp.MSVCRT.dll_realloc]
add esp, 8
test eax, eax
je 0x4ad737
mov edi, dword [esp + 0x10]
mov edx, dword [esp + 0x1c]
mov ecx, 0x2800
mov ebx, eax
add edi, ecx
add edx, ecx
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], edx
mov esi, dword [esi]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebx + ebp]
mov eax, ecx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
and ecx, 3
mov eax, dword [esp + 0x3c]
rep movsb byte es:[edi], byte [esi]
mov byte [ebx + ebp], 0x3d
mov esi, dword [eax + 4]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
inc ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [ebx + ebp]
mov eax, ecx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add ebp, eax
mov ax, word [esp + 0x38]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x48]
mov ecx, dword [esp + 0x18]
mov word [ebx + ebp], ax
add ebp, 2
mov esi, dword [esp + 0x24]
inc ecx
cmp ecx, edi
mov dword [esp + 0x18], ecx
jl 0x4ad566
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x34]
mov esi, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x34], eax
jl 0x4ad48c
mov eax, dword [esp + 0x1d4]
test eax, eax
je 0x4ad75e
cmp dword [eax], 0
je 0x4ad7cd
lea ecx, [esp + 0x50]
call fcn.00456600
mov edx, dword [esp + 0x1d8]
mov dword [esp + 0x1c8], 0
test edx, edx
jne 0x4ad6d1
mov edx, dword [edi + 0x13c]
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
shl ecx, 3
push ecx
push edx
lea ecx, [esp + 0x58]
call fcn.00456f10
lea edx, [ebp - 4]
lea eax, [ebx + 4]
push edx
push eax
lea ecx, [esp + 0x58]
call fcn.00456fc0
mov dword [esp + 0x1c8], 0xffffffff
lea ecx, [esp + 0x50]
jmp 0x4ad7c8
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov edx, dword [esp + 0x24]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4ad815
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov ecx, dword [esp + 0x24]
add esp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4ad815
mov eax, dword [edi + 0x138]
test eax, eax
je 0x4ad7cd
lea ecx, [esp + 0x108]
call fcn.00456600
mov edx, dword [edi + 0x13c]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x1c8], 1
shl ecx, 3
push ecx
push edx
lea ecx, [esp + 0x110]
call fcn.00456f10
lea ecx, [ebp - 4]
lea edx, [ebx + 4]
push ecx
push edx
lea ecx, [esp + 0x110]
call fcn.00456fc0
mov dword [esp + 0x1c8], 0xffffffff
lea ecx, [esp + 0x108]
call fcn.00456640
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x44]
push 0
push eax
push ebp
push ebx
push ecx
mov dword [esp + 0x58], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call dword [sym.imp.MSVCRT.dll_free]
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [esp + 0x28]
mov dword [edx + 4], 0
mov eax, 1
mov ecx, dword [esp + 0x1c0]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1bc
ret 0xc