Function at 0x1012d3c0
Capabilities:
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x258], 0
je 0x1012d46c
mov ecx, dword [ebx + 0x264]
mov eax, 0x2aaaaaab
sub ecx, dword [ebx + 0x260]
imul ecx
mov dword [ebp - 0x240], 0
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x1012d492
xor edi, edi
mov eax, dword [ebx + 0x260]
push ecx
mov esi, esp
mov eax, dword [eax + edi + 0x14]
sub eax, 0x10
push eax
call fcn.1012ca20
add esp, 4
add eax, 0x10
mov ecx, ebx
mov dword [esi], eax
call fcn.1012ca80
mov ecx, dword [ebx + 0x264]
lea edi, [edi + 0x18]
sub ecx, dword [ebx + 0x260]
mov eax, 0x2aaaaaab
mov esi, dword [ebp - 0x240]
imul ecx
inc esi
sar edx, 2
mov eax, edx
mov dword [ebp - 0x240], esi
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x1012d414
jmp 0x1012d492
mov eax, dword [ebp + 0x1c]
push ecx
add eax, 0xfffffff0
mov esi, esp
push eax
call fcn.1012ca20
add esp, 4
add eax, 0x10
mov ecx, ebx
mov dword [esi], eax
call fcn.1012ca80
test eax, eax
je 0x1012da1c
call fcn.10002d70
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0xc]
add eax, 0x10
lea ecx, [ebp - 0x248]
push 0x10202a60
mov dword [ebp - 0x248], eax
call fcn.1012c930
test al, al
jne 0x1012d4cd
push 0
push 0x10202a60
lea ecx, [ebp - 0x248]
call fcn.10131360
mov esi, dword [ebp - 0x248]
mov ecx, 1
mov edx, dword [ebx + 0x254]
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, edx
or ecx, eax
jge 0x1012d4fc
push edx
lea ecx, [ebp - 0x248]
call fcn.1005ce30
mov esi, dword [ebp - 0x248]
push dword [esi - 8]
push esi
call fcn.101e6e90
mov dword [esi - 0xc], eax
add esp, 8
mov byte [eax + esi], 0
mov edi, dword [ebx + 0x238]
cmp edi, dword [ebx + 0x23c]
je 0x1012d5ea
mov eax, dword [edi]
lea ecx, [ebp - 0x248]
push dword [eax - 0xc]
push eax
call fcn.1012c8a0
mov esi, dword [ebp - 0x248]
mov eax, 0x1020e594
sub eax, esi
mov dword [ebp - 0x240], 0x1020e594
mov dword [ebp - 0x250], eax
push 2
mov eax, dword [esi - 0xc]
push 0x1020e594
mov dword [ebp - 0x244], eax
call fcn.101e6e90
mov ecx, dword [esi - 8]
mov edx, 1
sub edx, dword [esi - 4]
add esp, 8
mov dword [ebp - 0x24c], eax
add eax, dword [ebp - 0x244]
sub ecx, eax
or edx, ecx
jge 0x1012d596
push eax
lea ecx, [ebp - 0x248]
call fcn.1005ce30
mov esi, dword [ebp - 0x248]
mov eax, dword [ebp - 0x250]
mov ecx, dword [ebp - 0x244]
cmp eax, ecx
ja 0x1012d5ae
add eax, esi
mov dword [ebp - 0x240], eax
mov eax, dword [ebp - 0x24c]
push eax
push dword [ebp - 0x240]
push eax
lea eax, [ecx + esi]
push eax
call fcn.10004510
mov eax, dword [ebp - 0x244]
add edi, 4
add eax, dword [ebp - 0x24c]
add esp, 0x10
mov dword [esi - 0xc], eax
mov byte [eax + esi], 0
cmp edi, dword [ebx + 0x23c]
jne 0x1012d521
push 0x208
lea eax, [ebp - 0x20c]
push 0
push eax
call sub.msvcrt.dll_memset
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x20c]
mov eax, ecx
add esp, 0xc
mov edx, 0x104
sub edi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x1012d632
movzx eax, word [edi + ecx]
test ax, ax
je 0x1012d632
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x1012d612
jmp 0x1012d636
test edx, edx
jne 0x1012d639
sub ecx, 2
xor eax, eax
mov word [ecx], ax
lea eax, [ebp - 0x20c]
push str..._tempHost
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.100d9c10
add esp, 8
mov dword [ebp - 0x240], 0
call fcn.10003180
mov edi, dword [eax + 0x154]
test edi, edi
je 0x1012d681
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 8
call fcn.10003680
add esp, 4
push 0
push 0
push 2
push 0
push 7
push 0x40000000
test eax, eax
je 0x1012d6a9
lea ecx, [ebp - 0x20c]
push ecx
call eax
jmp 0x1012d6b6
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x244], eax
test edi, edi
je 0x1012d6c7
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x244], 0
je 0x1012da00
cmp dword [ebx + 0x25c], 1
mov dword [ebp - 0x24c], 0
jne 0x1012d8e5
mov word [ebp - 0x250], 0xbbef
mov byte [ebp - 0x24e], 0xbf
call fcn.10003180
mov edi, dword [eax + 0x154]
test edi, edi
je 0x1012d711
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xa
call fcn.10003680
mov ebx, dword [ebp - 0x244]
add esp, 4
push 0
test eax, eax
je 0x1012d73c
lea ecx, [ebp - 0x24c]
push ecx
push 3
lea ecx, [ebp - 0x250]
push ecx
push ebx
call eax
jmp 0x1012d753
lea eax, [ebp - 0x24c]
push eax
push 3
lea eax, [ebp - 0x250]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test edi, edi
je 0x1012d75e
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [esi - 4], 1
jle 0x1012d778
push dword [esi - 0xc]
lea ecx, [ebp - 0x248]
call fcn.1005cc30
mov esi, dword [ebp - 0x248]
mov ecx, esi
mov dword [ebp - 0x214], 0
mov dword [ebp - 0x210], 0xf
mov byte [ebp - 0x224], 0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1012d798
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x224]
call fcn.10006fc0
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x23c]
push eax
call fcn.10006ef0
mov edx, dword [ebp - 0x210]
add esp, 8
cmp edx, 0x10
jb 0x1012d7fe
mov ecx, dword [ebp - 0x224]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1012d7f4
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1012da7e
push edx
push ecx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 8
cmp dword [ebp - 0x228], 0x10
mov eax, dword [ebp - 0x22c]
mov dword [ebp - 0x240], eax
lea eax, [ebp - 0x23c]
mov dword [ebp - 0x244], eax
jb 0x1012d82b
mov eax, dword [ebp - 0x23c]
mov dword [ebp - 0x244], eax
call fcn.10003180
mov edi, dword [eax + 0x154]
test edi, edi
je 0x1012d841
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xa
call fcn.10003680
add esp, 4
push 0
test eax, eax
je 0x1012d869
lea ecx, [ebp - 0x24c]
push ecx
push dword [ebp - 0x240]
push dword [ebp - 0x244]
push ebx
call eax
jmp 0x1012d883
lea eax, [ebp - 0x24c]
push eax
push dword [ebp - 0x240]
push dword [ebp - 0x244]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x240], eax
test edi, edi
je 0x1012d894
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edx, dword [ebp - 0x228]
xor eax, eax
cmp dword [ebp - 0x240], eax
setne al
mov dword [ebp - 0x240], eax
cmp edx, 0x10
jb 0x1012d95c
mov ecx, dword [ebp - 0x23c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1012d8d9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1012da83
push edx
push ecx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 8
jmp 0x1012d95c
mov ebx, dword [esi - 0xc]
call fcn.10003180
mov edi, dword [eax + 0x154]
test edi, edi
je 0x1012d8fe
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0xa
call fcn.10003680
add esp, 4
push 0
test eax, eax
je 0x1012d922
lea ecx, [ebp - 0x24c]
push ecx
push ebx
mov ebx, dword [ebp - 0x244]
push esi
push ebx
call eax
jmp 0x1012d938
lea eax, [ebp - 0x24c]
push eax
push ebx
mov ebx, dword [ebp - 0x244]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x244], eax
test edi, edi
je 0x1012d949
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 0x244], 0
je 0x1012d95c
mov dword [ebp - 0x240], 1
call fcn.10003180
mov edi, dword [eax + 0x154]
test edi, edi
je 0x1012d972
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x14
call fcn.10003680
add esp, 4
push ebx
test eax, eax
je 0x1012d985
call eax
jmp 0x1012d98b
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x1012d998
push edi
call ebx
cmp dword [ebp - 0x240], 0
je 0x1012da00
push 1
push dword [ebp + 8]
call fcn.100d9c10
mov eax, dword [ebp + 8]
add esp, 8
mov dword [ebp - 0x240], eax
call fcn.10003180
mov edi, dword [eax + 0x154]
test edi, edi
je 0x1012d9cd
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x2a
call fcn.10003680
add esp, 4
push dword [ebp - 0x240]
test eax, eax
je 0x1012d9ec
lea ecx, [ebp - 0x20c]
push ecx
call eax
jmp 0x1012d9f9
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test edi, edi
je 0x1012da00
push edi
call ebx
or ebx, 0xffffffff
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x1012da1f
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x1012da1f
or ebx, 0xffffffff
mov edx, dword [ebp + 0x1c]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1012da39
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 0x14]
mov eax, ebx
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1012da53
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x1012da6b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 0x1c
call fcn.101e6c40
call fcn.101e6c40
int3