Function at 0x412db0
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x49ec2c
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x4c13e0]
xor eax, esp
mov dword [esp + 0x100], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4c13e0]
xor eax, esp
push eax
lea eax, [esp + 0x118]
mov dword fs:[0], eax
mov ebx, ecx
lea eax, [ebx + 4]
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x54], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor ebp, ebp
mov dword [esp + 0x120], ebp
mov eax, dword [ebx + 0x158]
mov ecx, dword [eax + 4]
lea esi, [ebx + 0x140]
push ecx
mov ecx, esi
call fcn.00414780
mov eax, dword [esi + 0x18]
mov dword [eax + 4], eax
mov eax, dword [esi + 0x18]
mov dword [esi + 0x1c], ebp
mov dword [eax], eax
mov esi, dword [esi + 0x18]
lea edx, [esp + 0x5c]
mov dword [esi + 8], esi
push edx
mov dword [ebx + 0x1c], ebp
call fcn.00413470
mov byte [esp + 0x120], 1
mov ecx, dword [ebx + 0x20]
lea edi, [esp + 0x5c]
call fcn.004135b0
call fcn.00413bc0
mov edi, eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x14], edi
call fcn.00413cf0
mov byte [esp + 0x120], 2
mov eax, dword [esp + 0x40]
mov ecx, dword [eax]
mov dword [eax], eax
mov eax, dword [esp + 0x40]
mov dword [eax + 4], eax
mov dword [esp + 0x44], ebp
cmp ecx, dword [esp + 0x40]
je 0x412ea3
lea ecx, [ecx]
mov esi, dword [ecx]
push ecx
call fcn.00476df2
add esp, 4
mov ecx, esi
cmp esi, dword [esp + 0x40]
jne 0x412e90
cmp edi, ebp
je 0x41301e
mov esi, dword [edi + 0x14]
mov ebp, dword [edi]
lea eax, [esp + 0x18]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], esi
call fcn.004143b0
mov eax, dword [eax]
mov dword [esp + 0x20], eax
jmp 0x412edc
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
mov eax, dword [edi + 0x14]
mov ecx, dword [eax]
mov eax, dword [edi]
mov dword [esp + 0x58], ecx
test ebp, ebp
je 0x412eef
cmp ebp, eax
je 0x412ef4
call fcn.00477ad6
cmp esi, dword [esp + 0x58]
je 0x41300e
mov edi, ebp
mov dword [esp + 0x4c], esi
test ebp, ebp
jne 0x412f0d
call fcn.00477ad6
mov esi, dword [esi + 4]
test edi, edi
je 0x412f18
mov eax, dword [edi]
jmp 0x412f1a
xor eax, eax
cmp esi, dword [eax + 0x14]
jne 0x412f24
call fcn.00477ad6
test edi, edi
jne 0x412f85
call fcn.00477ad6
cmp esi, dword [edi + 0x14]
jne 0x412f37
call fcn.00477ad6
mov eax, dword [esp + 0x20]
sub eax, dword [esi + 8]
mov esi, dword [ebx + 0x168]
push 0
cdq
push 0x15180
push edx
push eax
call fcn.00483070
xor ecx, ecx
cmp edx, ecx
jg 0x41300a
jl 0x412f67
cmp eax, esi
jae 0x41300a
mov edi, dword [esp + 0x1c]
mov esi, ebp
mov dword [esp + 0x4c], edi
test ebp, ebp
jne 0x412f7a
call fcn.00477ad6
mov ebx, dword [edi + 4]
test esi, esi
je 0x412f89
mov eax, dword [esi]
jmp 0x412f8b
mov edi, dword [edi]
jmp 0x412f2d
xor eax, eax
cmp ebx, dword [eax + 0x14]
jne 0x412f95
call fcn.00477ad6
test esi, esi
jne 0x412ff1
call fcn.00477ad6
cmp ebx, dword [esi + 0x14]
jne 0x412fa8
call fcn.00477ad6
mov eax, dword [esp + 0x40]
mov edx, dword [eax + 4]
lea edi, [eax + 4]
add ebx, 8
push ebx
push edx
push eax
call fcn.004149f0
mov ecx, 1
lea edx, [esp + 0x2c]
mov esi, eax
call fcn.00414a40
mov dword [edi], esi
mov eax, dword [esi + 4]
mov dword [eax], esi
test ebp, ebp
jne 0x412fdd
call fcn.00477ad6
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx + 4]
mov dword [esp + 0x1c], ecx
test ebp, ebp
je 0x412ff5
mov eax, dword [ebp]
jmp 0x412ff7
mov esi, dword [esi]
jmp 0x412f9e
xor eax, eax
cmp ecx, dword [eax + 0x14]
jne 0x412ed0
call fcn.00477ad6
jmp 0x412ed0
mov edi, dword [esp + 0x14]
lea edx, [esp + 0xfc]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ebp, ebp
mov eax, dword [ebx + 0x20]
cmp dword [eax - 0xc], ebp
jne 0x413057
lea esi, [esp + 0x2c]
call fcn.00407140
mov eax, dword [esp + 0x2c]
push eax
call fcn.00476df2
add esp, 4
lea eax, [esp + 0x5c]
call fcn.00411f00
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
jmp 0x4131ba
mov dword [esp + 0x14], ebp
mov byte [esp + 0x120], 3
mov ecx, dword [esp + 0x44]
cmp ecx, ebp
jbe 0x41318b
cmp ecx, dword [edi + 0x18]
je 0x41318b
push ebp
push 0x80
push 4
push ebp
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x413173
call fcn.00408010
cmp eax, ebp
jne 0x41318b
push ebp
push ebp
lea edx, [esp + 0x1c]
push edx
call fcn.00415ca0
test eax, eax
jne 0x41317c
mov edx, dword [esp + 0x14]
push ebp
lea eax, [esp + 0x24]
push eax
push 0x64
lea ecx, [ebx + 0x24]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4130e1
call fcn.00408010
cmp eax, ebp
jne 0x41317c
push ebp
push 0x64
lea esi, [esp + 0x1c]
call fcn.00415c10
test eax, eax
jne 0x41317c
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x413108
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x14], ebp
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x20], 1
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ecx
mov edx, dword [esp + 0x40]
mov esi, dword [edx]
cmp eax, ebp
je 0x413130
cmp eax, dword [esp + 0x2c]
je 0x413135
call fcn.00477ad6
cmp dword [esp + 0x1c], esi
je 0x41317c
push ebp
push ecx
lea eax, [esp + 0x20]
mov dword [esp + 0x2c], 0xffffffff
call fcn.00414360
add esp, 4
push eax
push ebx
lea edx, [esp + 0x2c]
lea ecx, [esp + 0x30]
call fcn.00412a20
lea edi, [esp + 0x48]
lea eax, [esp + 0x18]
call fcn.00414320
mov eax, dword [esp + 0x18]
jmp 0x413120
mov dword [esp + 0x14], eax
jmp 0x4130a5
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x41318b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [esp + 0x2c]
call fcn.00407140
mov eax, dword [esp + 0x2c]
push eax
call fcn.00476df2
add esp, 4
lea eax, [esp + 0x5c]
call fcn.00411f00
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, 1
mov ecx, dword [esp + 0x118]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x100]
xor ecx, esp
call fcn.00476dfd
add esp, 0x110
ret