Function at 0x52d503
Capabilities:
Extract resource via kernel32 functions
Get file size
Read file on windows

Disassembly:
push 0x30
mov eax, 0x5e030a
call fcn.00506dc7
mov ebx, ecx
mov dword [ebp - 0x18], ebx
cmp dword [ebp + 0xc], 0
jne 0x52d521
xor al, al
jmp 0x52d8b9
push dword [ebp + 0x18]
mov byte [ebp - 0xd], 0
call fcn.0052b343
pop ecx
test eax, eax
je 0x52d5c4
push eax
push dword [ebp + 8]
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
je 0x52d89f
push esi
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x52d5b8
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push dword [ebx + 4]
mov edi, eax
mov dword [ebp + 0x1c], edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, eax
test edi, edi
je 0x52d5b8
lea eax, [ecx - 1]
cmp eax, 0xffffff
ja 0x52d5b8
mov edi, dword [ebp + 0x10]
lea eax, [ecx + 1]
push eax
mov dword [edi], ecx
call fcn.00506f2d
mov ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov eax, dword [edi]
inc eax
push eax
push 0
push ecx
call fcn.0056b050
push dword [edi]
mov eax, dword [ebp + 0xc]
push dword [ebp + 0x1c]
push dword [eax]
call fcn.0056a550
add esp, 0x1c
mov byte [ebp - 0xd], 1
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x52d899
call fcn.0041279d
push eax
lea ecx, [ebp - 0x14]
call fcn.00411d94
push dword [ebp + 8]
and dword [ebp - 4], 0
lea eax, [ebp - 0x14]
push 0x5f1ce0
push eax
call fcn.00412690
add esp, 0xc
lea ecx, [ebp - 0x14]
call fcn.0043193c
call fcn.0041279d
push eax
lea ecx, [ebp - 0x20]
call fcn.00411d94
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff0
mov byte [ebp - 4], 1
push eax
mov dword [ebp - 0x30], eax
call fcn.00412393
pop ecx
lea esi, [eax + 0x10]
mov dword [ebp + 0x18], esi
xor eax, eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov byte [ebp - 4], 3
cmp dword [ebp + 0x1c], eax
jne 0x52d6c4
lea eax, [ebx + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebx + 0x10]
call fcn.0052f45a
mov eax, dword [eax]
cmp eax, dword [ebx + 0x10]
je 0x52d665
add eax, 0x14
lea ecx, [ebp + 0x18]
push eax
call fcn.00411f3a
mov esi, dword [ebp + 0x18]
push dword [ebx + 0xc]
lea eax, [esi - 0x10]
push ecx
mov edi, esp
push eax
mov dword [ebp - 0x2c], edi
call fcn.00412393
add eax, 0x10
mov dword [edi], eax
lea eax, [ebp - 0x1c]
pop ecx
push eax
call fcn.0052e08c
add esp, 0xc
push esi
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.0042e677
test eax, eax
je 0x52d6a6
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004366b4
lea eax, [ebx + 0x80]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], 3
lea ecx, [ecx - 0x10]
call fcn.00412ac4
jmp 0x52d701
cmp dword [ebp + 0x1c], 1
jne 0x52d701
lea edi, [ebx + 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebx + 0x18]
call fcn.0052f45a
mov eax, dword [eax]
cmp eax, dword [ebx + 0x18]
je 0x52d6fa
add eax, 0x14
lea ecx, [ebp + 0x18]
push eax
call fcn.00411f3a
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea eax, [ebp + 0x18]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004366b4
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp + 0x18]
cmp edi, dword [ebp - 0x38]
je 0x52d873
mov eax, dword [edi]
sub eax, 0x10
push eax
call fcn.00412393
mov dword [ebp - 0x28], eax
add eax, 0x10
mov dword [ebp - 0x2c], eax
push eax
push dword [ebx]
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 5
push 0x61dcd4
push eax
call fcn.00412690
mov ebx, dword [ebp - 0x20]
add esp, 0x14
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
jne 0x52d78f
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x1c], eax
cmp eax, 0xffffffff
je 0x52d7fb
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
lea eax, [ecx - 1]
cmp eax, 0xffffff
ja 0x52d7fb
lea eax, [ecx + 1]
push eax
call fcn.00506f2d
mov ecx, eax
mov eax, dword [ebp + 0xc]
mov dword [eax], ecx
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
inc eax
push eax
push 0
push ecx
call fcn.0056b050
and dword [ebp - 0x24], 0
lea eax, [ebp - 0x24]
add esp, 0x10
push 0
push eax
mov eax, dword [ebp + 0x10]
push dword [eax]
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x24]
cmp eax, dword [ecx]
je 0x52d859
mov eax, dword [ebp - 0x18]
cmp dword [eax + 8], 0
je 0x52d83d
cmp dword [esi - 4], 1
jle 0x52d818
push dword [esi - 0xc]
lea ecx, [ebp + 0x18]
call fcn.00412624
mov esi, dword [ebp + 0x18]
push dword [ebp + 0x1c]
push 0
push ecx
mov eax, esp
push dword [ebp + 0x14]
push dword [ebp + 0x10]
mov dword [eax], esi
mov eax, dword [ebp - 0x18]
push dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov eax, dword [ecx]
call dword [eax + 0xc]
mov byte [ebp - 0xd], al
test al, al
jne 0x52d85d
mov ecx, dword [ebp - 0x28]
mov byte [ebp - 4], 3
call fcn.00412ac4
add edi, 4
cmp edi, dword [ebp - 0x38]
je 0x52d876
mov ebx, dword [ebp - 0x18]
jmp 0x52d71c
mov byte [ebp - 0xd], 1
mov ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x2c]
push eax
call fcn.00411f3a
mov ecx, dword [ebp - 0x28]
call fcn.00412ac4
jmp 0x52d876
mov ebx, dword [ebp - 0x20]
lea ecx, [ebp - 0x3c]
call fcn.00436307
lea ecx, [esi - 0x10]
call fcn.00412ac4
lea ecx, [ebx - 0x10]
call fcn.00412ac4
mov ecx, dword [ebp - 0x30]
call fcn.00412ac4
mov ebx, dword [ebp - 0x18]
cmp byte [ebp - 0xd], 0
jne 0x52d8b6
mov eax, dword [ebp + 0x10]
and dword [eax], 0
mov eax, dword [ebp + 0xc]
cmp dword [eax], 0
je 0x52d8b6
push dword [eax]
mov ecx, ebx
call fcn.0052b39b
mov al, byte [ebp - 0xd]
call fcn.00506d90
ret 0x18