Function at 0x101b78e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x470
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 8]
push edi
lea edi, [ebx + 0x28]
mov dword [ebp - 0x460], ebx
mov dword [ebp - 0x470], esi
mov dword [ebp - 0x46c], edi
test edi, edi
je 0x101b791b
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x410
lea eax, [ebp - 0x414]
push 0
push eax
call sub.msvcrt.dll_memset
xor eax, eax
lea ecx, [ebp - 0x414]
add esp, 0xc
mov dword [ebp - 0x454], eax
cmp word [esi], ax
mov edx, 0x208
mov eax, ecx
je 0x101b7970
sub esi, eax
lea ecx, [ecx]
lea eax, [edx + 0x7ffffdf6]
test eax, eax
je 0x101b7995
movzx eax, word [esi + ecx]
test ax, ax
je 0x101b7995
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x101b7950
jmp 0x101b7999
mov esi, dword [ebx + 0x40]
sub esi, eax
lea eax, [edx + 0x7ffffdf6]
test eax, eax
je 0x101b7995
movzx eax, word [esi + ecx]
test ax, ax
je 0x101b7995
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x101b7975
jmp 0x101b7999
test edx, edx
jne 0x101b799c
sub ecx, 2
xor eax, eax
mov word [ecx], ax
lea eax, [ebp - 0x414]
push 1
push eax
call fcn.100d9c10
add esp, 8
call fcn.10003180
mov esi, dword [eax + 0x154]
test esi, esi
je 0x101b79c8
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 8
call fcn.10003680
add esp, 4
push 0
push 0
push 2
push 0
push 1
push 0x40000000
test eax, eax
je 0x101b79f0
lea ecx, [ebp - 0x414]
push ecx
call eax
jmp 0x101b79fd
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x44c], eax
test esi, esi
je 0x101b7a0e
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x44c], 0xffffffff
jne 0x101b7a1e
xor ebx, ebx
jmp 0x101b7d16
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x41c], eax
imul eax, eax, 0xf1c
mov dword [ebp - 0x43c], 0
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x434], 0
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x450], eax
add eax, 0x10
push eax
mov dword [ebp - 0x42c], 0
mov dword [ebp - 0x428], 0
mov dword [ebp - 0x424], 0
mov dword [ebp - 0x420], 0
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x440], 2
mov dword [ebp - 0x448], 2
mov dword [ebp - 0x444], 0xb
call sub.msvcrt.dll_malloc
mov ecx, dword [ebp - 0x460]
add esp, 4
xor ebx, ebx
mov dword [ebp - 0x45c], eax
mov edx, dword [ecx]
mov ecx, dword [ecx + 4]
sub ecx, edx
sar ecx, 2
test ecx, ecx
je 0x101b7b1a
mov esi, dword [edx + ebx*4]
test esi, esi
je 0x101b7af0
mov edx, dword [ebp - 0x460]
mov ecx, 0x3c7
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov edx, dword [edx]
add eax, 0xf1c
inc ebx
mov dword [ebp - 0x468], eax
mov eax, dword [ebp - 0x460]
mov eax, dword [eax + 4]
sub eax, edx
sar eax, 2
cmp ebx, eax
mov eax, dword [ebp - 0x468]
jb 0x101b7ad8
mov edi, dword [ebp - 0x46c]
push dword [ebp - 0x450]
push dword [ebp - 0x45c]
call fcn.100574c0
add esp, 8
mov dword [ebp - 0x418], eax
call fcn.10003180
mov esi, dword [eax + 0x154]
test esi, esi
je 0x101b7b4a
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xa
call fcn.10003680
mov ebx, dword [ebp - 0x44c]
add esp, 4
push 0
test eax, eax
je 0x101b7b75
lea ecx, [ebp - 0x464]
push ecx
push 0x34
lea ecx, [ebp - 0x448]
push ecx
push ebx
call eax
jmp 0x101b7b8c
lea eax, [ebp - 0x464]
push eax
push 0x34
lea eax, [ebp - 0x448]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
je 0x101b7b97
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x1024e5d8]
mov dword [ebp - 0x458], 0
test eax, eax
je 0x101b7cae
lea ecx, [ebp - 0x458]
push ecx
push 0x10217644
call eax
mov eax, dword [ebp - 0x458]
test eax, eax
je 0x101b7cae
mov ecx, dword [eax]
push 0
push 0
push 0
push 8
push 0x1021d850
push 0x100
push eax
call dword [ecx + 0xc]
mov eax, dword [ebp - 0x458]
lea edx, [ebp - 0x450]
mov esi, dword [ebp - 0x45c]
push edx
push esi
push dword [ebp - 0x450]
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x10]
mov eax, dword [ebp - 0x458]
lea ecx, [ebp - 0x454]
push ecx
mov ecx, dword [ebp - 0x450]
mov dword [ebp - 0x454], 0
add ecx, esi
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [ebp - 0x454]
add eax, dword [ebp - 0x450]
mov dword [ebp - 0x44c], eax
mov dword [ebp - 0x450], eax
call fcn.10003180
mov esi, dword [eax + 0x154]
test esi, esi
je 0x101b7c57
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xa
call fcn.10003680
add esp, 4
push 0
test eax, eax
je 0x101b7c7f
lea ecx, [ebp - 0x464]
push ecx
push dword [ebp - 0x44c]
push dword [ebp - 0x45c]
push ebx
call eax
jmp 0x101b7c99
lea eax, [ebp - 0x464]
push eax
push dword [ebp - 0x44c]
push dword [ebp - 0x45c]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test esi, esi
je 0x101b7ca4
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0x454], 1
call fcn.10003180
mov esi, dword [eax + 0x154]
test esi, esi
je 0x101b7cc4
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x14
call fcn.10003680
add esp, 4
push ebx
test eax, eax
je 0x101b7cd7
call eax
jmp 0x101b7cdd
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
je 0x101b7ce8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x460]
add eax, 0x24
push eax
push dword [ebp - 0x470]
call fcn.100dacc0
mov eax, dword [ebp - 0x458]
add esp, 8
test eax, eax
je 0x101b7d10
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ebx, dword [ebp - 0x454]
test edi, edi
je 0x101b7d21
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 4