Function at 0x424040
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c7c20
mov eax, dword fs:[0]
push eax
sub esp, 0x450
mov eax, dword [0x51c080]
xor eax, ebp
mov dword [ebp - 0x18], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0x434], eax
mov esi, ecx
xor edi, edi
mov dword [ebp - 0x428], edi
mov dword [ebp - 0x430], 0xffffffff
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x438], edi
mov dword [ebp - 4], edi
cmp eax, edi
je 0x424321
cmp esi, edi
je 0x424321
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4240b2
sub eax, edx
sar eax, 1
je 0x424321
push 0x408
push edi
lea eax, [ebp - 0x424]
push eax
call fcn.004ab450
xor ecx, ecx
cmp byte [ebp + 0x10], cl
setne cl
mov dword [ebp - 0x420], ecx
push 0x5c
push esi
call fcn.004a9ce4
add esp, 0x14
cmp eax, edi
je 0x4240fb
add eax, 2
jmp 0x4240fd
mov eax, esi
push 0xff
push eax
push 0x100
lea edx, [ebp - 0x21c]
push edx
call fcn.004a9be0
mov eax, dword [ebp + 0xc]
push eax
push str.FILE_d
lea edx, [ebp - 0x41c]
call fcn.0040bfd0
add esp, 0x18
push edi
push 0x80
push 3
push edi
push edi
push bind
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x430], ebx
cmp ebx, 0xffffffff
jne 0x42416b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x44c], eax
push 0x5042a0
lea ecx, [ebp - 0x44c]
push ecx
call fcn.004abd6e
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x424], eax
cmp eax, edi
jne 0x42419a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x43c], eax
push 0x5042a0
lea edx, [ebp - 0x43c]
push edx
call fcn.004abd6e
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
mov dword [ebp - 0x42c], edi
test edi, edi
jne 0x4241ca
mov dword [ebp - 0x444], 0x7a
push 0x5042a0
lea eax, [ebp - 0x444]
push eax
call fcn.004abd6e
push 0
lea ecx, [ebp - 0x438]
push ecx
mov edx, dword [ebp - 0x424]
push edx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x424203
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x448], eax
push 0x5042a0
lea eax, [ebp - 0x448]
push eax
call fcn.004abd6e
mov eax, dword [ebp - 0x438]
mov dword [ebp - 0x424], eax
push eax
push edi
push 0x400
lea ecx, [ebp - 0x41c]
push ecx
push str.FILES
mov edx, dword [ebp - 0x434]
push edx
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
test eax, eax
je 0x4242e9
mov eax, dword [ebp - 0x424]
push eax
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x41c]
push edx
push str.Add_File_to_resource_success:__Index:_s__File:_s__size:_d_
mov ecx, 0x527b30
call fcn.00449000
add esp, 0x10
push 0x408
lea eax, [ebp - 0x424]
push eax
push 0x400
lea ecx, [ebp - 0x41c]
push ecx
push str.FILEINFO
mov edx, dword [ebp - 0x434]
push edx
call dword [sym.imp.KERNEL32.dll_UpdateResourceW]
test eax, eax
je 0x4242bf
mov eax, dword [ebp - 0x424]
push eax
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x41c]
push edx
push str.Add_File_info_success:__Index:_s__File:_s__size:_d_
mov ecx, 0x527b30
call fcn.00449000
add esp, 0x10
mov dword [ebp - 4], 0xffffffff
jmp 0x424392
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x428], eax
push str.Add_File_List_fail__
mov ecx, 0x527b30
call fcn.00449000
add esp, 4
mov dword [ebp - 4], 0xffffffff
jmp 0x424392
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov dword [ebp - 0x428], edi
push esi
push str.Add_File_data_fail_____s_
mov ecx, 0x527b30
call fcn.00449000
add esp, 8
mov dword [ebp - 0x450], edi
push 0x5042a0
lea eax, [ebp - 0x450]
push eax
call fcn.004abd6e
mov dword [ebp - 0x440], 0x57
push 0x5042a0
lea ecx, [ebp - 0x440]
push ecx
call fcn.004abd6e
mov ecx, dword [ebp - 0x458]
mov dword [ebp - 0x428], ecx
push str.CPackage::AddFileToResource
mov edx, 0x527b30
call fcn.00448ec0
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, 0x424386
ret
mov dword [ebp - 4], 2
test edi, edi
je 0x4243a4
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
cmp ebx, 0xffffffff
je 0x4243b0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x428]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.004a998e
mov esp, ebp
pop ebp
ret 0xc