Function at 0x471fb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x288
mov eax, dword [0x51e080]
xor eax, esp
mov dword [esp + 0x284], eax
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
mov dword [esp + 0x30], eax
push edi
mov dword [esp + 0x24], esi
lea eax, [esi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esi + 0x20]
lea eax, [esi + 0x28]
xor ecx, ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], ecx
test edi, edi
je 0x472050
mov edx, dword [eax]
add edx, 8
nop dword [eax]
mov eax, dword [edx]
test eax, eax
jns 0x47202c
movzx eax, al
test eax, eax
je 0x472029
cmp eax, 1
je 0x472029
cmp eax, 2
je 0x472029
cmp eax, 3
je 0x472021
cmp eax, 4
jne 0x47202c
add ecx, 8
add ecx, dword [edx + 4]
jmp 0x47202c
add ecx, 0xc
add edx, 0x18
mov eax, ecx
sub edi, 1
jne 0x472000
mov edx, eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
and edx, 0xf
je 0x47205a
sub ecx, edx
mov dword [esp + 0x18], eax
add ecx, 0x10
jmp 0x472056
mov dword [esp + 0x2c], eax
xor ecx, ecx
mov dword [esp + 0x14], ecx
lea edi, [ecx + 0x50]
push edi
mov dword [esp + 0x3c], edi
call fcn.004d9a7e
add esp, 4
mov dword [esp + 0x28], eax
push edi
call fcn.004d9a7e
mov ecx, dword [esi + 4]
add esp, 4
mov dword [esp + 0x20], eax
mov esi, dword [ecx + 0x488]
lea edi, [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 4
push dword [esp + 0x2c]
mov ecx, esi
call fcn.004b0e10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x28]
xor edx, edx
mov edi, dword [esp + 0x24]
mov eax, dword [esp + 0x18]
mov dword [esp + 0x30], edx
mov dword [esi + 4], eax
add esi, 8
cmp dword [edi + 0x20], edx
jbe 0x47214d
xor ecx, ecx
mov dword [esp + 0x1c], ecx
nop dword [eax]
mov eax, dword [esp + 0x2c]
mov edi, dword [eax]
mov eax, dword [edi + ecx + 8]
add edi, ecx
test eax, eax
jns 0x472138
movzx eax, al
test eax, eax
je 0x472124
cmp eax, 1
je 0x472124
cmp eax, 2
je 0x472124
cmp eax, 3
je 0x4720fb
cmp eax, 4
jne 0x472138
mov eax, dword [edi]
mov dword [esi], eax
mov eax, dword [edi + 0xc]
mov dword [esi + 4], eax
add esi, 8
push dword [edi + 0xc]
push dword [edi + 0x14]
push esi
call fcn.004d6950
mov ecx, dword [esp + 0x28]
add esp, 0xc
add esi, dword [edi + 0xc]
mov edx, dword [esp + 0x30]
jmp 0x472138
mov eax, dword [edi]
mov dword [esi], eax
mov dword [esi + 4], 4
mov eax, dword [edi + 0x14]
mov dword [esi + 8], eax
add esi, 0xc
mov edi, dword [esp + 0x24]
inc edx
add ecx, 0x18
mov dword [esp + 0x30], edx
mov dword [esp + 0x1c], ecx
cmp edx, dword [edi + 0x20]
jb 0x4720d0
lea eax, [edi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [edi + 4]
mov edi, dword [eax + 0x488]
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x14]
mov ecx, edi
sub eax, dword [esp + 0x18]
add eax, 8
push eax
push esi
call fcn.004b0e10
lea eax, [edi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0x14]
mov eax, edi
sub eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
add eax, 8
add eax, esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x480]
test ecx, ecx
je 0x472245
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0xffffffff
push eax
lea eax, [edi + 0x10]
mov dword [esp + 0x48], 0xffffffff
push eax
push ecx
mov ecx, edx
mov dword [esp + 0x54], 0xffffffff
mov dword [esp + 0x58], 0xffffffff
mov dword [esp + 0x5c], 0xffffffff
mov dword [esp + 0x60], 0xffffffff
mov dword [esp + 0x64], 0xffffffff
mov dword [esp + 0x68], 0xffffffff
call fcn.004b1300
xor dword [esp + 0x40], 0x81e6b3f
xor dword [esp + 0x44], 0x569ed9b
xor dword [esp + 0x48], 0x2cd5d85
xor dword [esp + 0x4c], 0x674b7466
xor dword [esp + 0x50], 0x2d027638
xor dword [esp + 0x54], 0x5b299276
xor dword [esp + 0x58], 0xb671f6d
xor dword [esp + 0x5c], 0x52453c93
movups xmm0, xmmword [esp + 0x40]
mov eax, dword [esp + 0x1c]
movups xmmword [eax], xmm0
movups xmm0, xmmword [esp + 0x50]
movups xmmword [eax + 0x10], xmm0
mov eax, dword [esi + 4]
mov esi, dword [eax + 0x488]
lea edi, [esi + 4]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
add edx, 0x30
add ecx, edx
push 0x20
push ecx
mov ecx, esi
call fcn.004b0e10
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x9c4
call fcn.004d3886
mov ecx, dword [esp + 0x24]
add esp, 4
mov edi, dword [esp + 0x14]
mov esi, eax
add ecx, 0x30
mov dword [esp + 0x18], esi
add edi, ecx
mov ecx, esi
push 8
push edi
mov dword [esi + 0x9c0], 0x271
call fcn.004b42f0
mov ecx, esi
call fcn.00409ee0
xor eax, 0x729a48f7
mov ecx, esi
mov dword [esp + 0x1c], eax
mov eax, dword [edi]
xor eax, 0x2781ce40
mov dword [esp + 0x30], eax
call fcn.00409ee0
mov ecx, dword [esp + 0x20]
mov edi, dword [edi + 4]
imul eax, eax, 0xf4908bb2
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
mov eax, dword [ecx + eax + 0x4c]
mov ecx, esi
xor eax, 0x2781ce40
mov dword [esp + 0x26c], eax
call fcn.00409ee0
mov edx, dword [esp + 0x14]
mov ecx, esi
mov dword [esp + 0x270], eax
mov eax, dword [esp + 0x20]
mov eax, dword [eax + edx + 0x38]
mov dword [esp + 0x274], eax
call fcn.00409ee0
mov ecx, dword [esp + 0x18]
mov esi, eax
call fcn.00409ee0
mov edx, dword [esp + 0x20]
xor eax, esi
add edx, dword [esp + 0x14]
mov ecx, dword [edx + 0x3c]
xor ecx, eax
mov dword [esp + 0x278], ecx
mov eax, dword [edx + 0x48]
xor eax, dword [edx + 0x40]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x27c], eax
call fcn.00409ee0
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x280], eax
call fcn.00409ee0
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
mov ecx, dword [ecx + edx + 0x44]
xor ecx, eax
mov esi, dword [esp + 0x18]
mov dword [esp + 0x284], ecx
mov ecx, esi
call fcn.00409ee0
xor eax, 0x19750309
push 0x9c4
push esi
mov dword [esp + 0x290], eax
call fcn.004d38b6
mov esi, dword [esp + 0x2c]
lea eax, [esp + 0x274]
add esp, 8
mov ecx, dword [esi + 4]
push eax
push 0x20
lea eax, [esp + 0x68]
mov ecx, dword [ecx + 0x484]
push eax
call fcn.004b48f0
mov eax, dword [esi + 4]
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x28]
add edx, 0x30
mov ecx, dword [eax + 0x484]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x240], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x244], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x24c], edi
mov edi, dword [esp + 0x20]
mov dword [esp + 0x248], eax
test esi, esi
je 0x472470
test edi, edi
je 0x472470
mov eax, dword [esp + 0x260]
cmp eax, 0xa
je 0x47242e
cmp eax, 0xc
je 0x47242e
cmp eax, 0xe
jne 0x472470
test dl, 0xf
jne 0x472470
shr edx, 4
sub eax, 0xa
je 0x472463
sub eax, 2
je 0x472454
sub eax, 2
jne 0x472470
push edx
push edi
push esi
lea eax, [esp + 0x6c]
push eax
call fcn.004b6710
jmp 0x472470
push edx
push edi
push esi
lea eax, [esp + 0x6c]
push eax
call fcn.004b7580
jmp 0x472470
push edx
push edi
push esi
lea eax, [esp + 0x6c]
push eax
call fcn.004b8200
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x4724f2
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
push 0x80
push 2
push 0
push 7
push 0x40000000
push dword [esp + 0x4c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esp + 0x1c], eax
cmp eax, 0xffffffff
jne 0x4724f2
push esi
call fcn.004d9a63
add esp, 4
push edi
call fcn.004d9a63
add esp, 4
mov eax, 1
pop edi
pop esi
mov ecx, dword [esp + 0x284]
xor ecx, esp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4
push 0
lea ecx, [esp + 0x40]
push ecx
push dword [esp + 0x40]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.004d9a63
add esp, 4
push edi
call fcn.004d9a63
mov ecx, dword [esp + 0x290]
add esp, 4
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.004d3878
mov esp, ebp
pop ebp
ret 4