Function at 0x48c378
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push esi
push edi
add esp, 0xfffffc4c
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
mov esi, 0x4cd81b
lea edi, [esp + 0x84]
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
mov esi, 0x4cd91b
lea edi, [esp + 0x184]
mov ecx, 0x40
rep movsd dword es:[edi], dword [esi]
cmp dword [0x4d3344], 0
je 0x48c472
mov word [esp + 0x78], 0x12d
mov byte [esp + 0x284], 0x18
mov eax, dword [esp]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [esp + 4]
push edx
lea ecx, [esp + 0x28d]
push ecx
call fcn.00484d40
add esp, 0xc
mov eax, dword [esp + 4]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [esp + 8]
push edx
lea ecx, [esp + 0x2a1]
push ecx
call fcn.00484d40
add esp, 0xc
mov eax, dword [esp + 8]
push eax
call sub.kernel32.dll_lstrlenA_1
inc eax
push eax
mov edx, dword [esp + 0xc]
push edx
lea ecx, [esp + 0x2b5]
push ecx
call fcn.00484d40
add esp, 0xc
push 2
lea ecx, [esp + 0x80]
lea eax, [esp + 0x288]
mov dx, word [esp + 0x7c]
call fcn.00491d6c
mov word [esp + 0x7a], ax
push 2
lea eax, [esp + 0x80]
push eax
lea edx, [esp + 0x82]
push edx
call fcn.00484d40
add esp, 0xc
movsx eax, word [esp + 0x7a]
jmp 0x48ce68
mov eax, dword [esp]
call fcn.0048d9bc
mov dword [esp + 0x34], eax
mov eax, dword [esp + 4]
call fcn.0048d9bc
mov dword [esp + 0x38], eax
xor edx, edx
mov dword [esp + 0x3c], edx
lea ecx, [esp + 0xc]
mov dword [esp + 0x80], ecx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x34]
shl ecx, 3
mov edx, dword [esp + 0x80]
shl eax, cl
shr eax, 0x18
mov byte [edx], al
inc dword [esp + 0x3c]
inc dword [esp + 0x80]
cmp dword [esp + 0x3c], 3
jle 0x48c49c
xor eax, eax
lea edx, [esp + 0x10]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x80], edx
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
shl ecx, 3
mov edx, dword [esp + 0x80]
shl eax, cl
shr eax, 0x18
mov byte [edx], al
inc dword [esp + 0x3c]
inc dword [esp + 0x80]
cmp dword [esp + 0x3c], 3
jle 0x48c4d8
mov ecx, dword [esp + 8]
push ecx
call sub.kernel32.dll_lstrlenA_1
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x40]
inc eax
push eax
push 2
call sub.kernel32.dll_GlobalAlloc
mov dword [esp + 0x48], eax
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalLock
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 8]
push ecx
mov eax, dword [esp + 0x50]
push eax
call sub.kernel32.dll_lstrcpyA
push 0x4d0b2e
push 1
push 1
push 0
call sub.kernel32.dll_CreateSemaphoreA
mov dword [esp + 0x44], eax
lea edx, [esp + 0x84]
push edx
call sub.kernel32.dll_lstrlenA_1
push eax
push 0
lea ecx, [esp + 0x8c]
push ecx
call fcn.00484d28
add esp, 0xc
lea eax, [esp + 0x184]
push eax
call sub.kernel32.dll_lstrlenA_1
push eax
push 0
lea edx, [esp + 0x18c]
push edx
call fcn.00484d28
add esp, 0xc
mov edx, 0x2f
mov eax, dword [esp + 0x4c]
call fcn.00488330
mov dword [esp + 0x50], eax
cmp dword [esp + 0x50], 0
jne 0x48c5c8
mov ecx, dword [esp + 0x4c]
push ecx
lea eax, [esp + 0x188]
push eax
call sub.kernel32.dll_lstrcpyA
mov dword [esp + 0x3c], 0xffffffff
jmp 0x48c5f4
mov edx, dword [esp + 0x50]
sub edx, dword [esp + 0x4c]
inc edx
push edx
mov ecx, dword [esp + 0x50]
push ecx
lea eax, [esp + 0x18c]
push eax
call sub.kernel32.dll_lstrcpynA_1
mov edx, dword [esp + 0x50]
inc edx
push edx
mov ecx, dword [esp + 0x50]
push ecx
call sub.kernel32.dll_lstrcpyA
lea eax, [esp + 0x184]
call fcn.0048d908
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x54]
call fcn.0048d93c
mov edx, dword [esp + 0x54]
push edx
call sub.kernel32.dll_lstrlenA_1
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x54]
add ecx, dword [esp + 0x40]
add ecx, 0xfffffffe
mov dword [esp + 0x58], ecx
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_CreateFileA
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x48c66c
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff37
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x20]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_ReadFile
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48c6b7
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff34
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x28]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_ReadFile
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48c702
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff34
jmp 0x48ce68
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle
push 0xffffffffffffffff
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_WaitForSingleObject
push 0x4d0b15
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
call fcn.00488774
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x48c774
push 0x4d0b15
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
call fcn.00488774
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x48c774
push 0x4d0b15
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
call fcn.00488774
mov dword [esp + 0x74], eax
push 0
push 1
mov eax, dword [esp + 0x4c]
push eax
call sub.kernel32.dll_ReleaseSemaphore
cmp dword [esp + 0x74], 0
je 0x48c7a6
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x74]
jmp 0x48ce68
push 0xffffffffffffffff
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_WaitForSingleObject
push 0x4d0b15
lea ecx, [esp + 0x30]
lea edx, [esp + 0x20]
lea eax, [esp + 0x10]
call fcn.00488774
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x48c80e
push 0x4d0b15
lea ecx, [esp + 0x30]
lea edx, [esp + 0x20]
lea eax, [esp + 0x10]
call fcn.00488774
mov dword [esp + 0x74], eax
cmp dword [esp + 0x74], 0
je 0x48c80e
push 0x4d0b15
lea ecx, [esp + 0x30]
lea edx, [esp + 0x20]
lea eax, [esp + 0x10]
call fcn.00488774
mov dword [esp + 0x74], eax
push 0
push 1
mov ecx, dword [esp + 0x4c]
push ecx
call sub.kernel32.dll_ReleaseSemaphore
cmp dword [esp + 0x74], 0
je 0x48c840
mov eax, dword [esp + 0x48]
push eax
call sub.kernel32.dll_GlobalFree
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x74]
jmp 0x48ce68
push 0x4d0b36
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x48c978
mov ecx, dword [esp + 0x54]
push ecx
call sub.kernel32.dll_lstrlenA_1
dec eax
push eax
mov eax, dword [esp + 0x58]
push eax
lea edx, [esp + 0x8c]
push edx
call sub.kernel32.dll_lstrcpynA_1
push 0x4d0b39
lea ecx, [esp + 0x88]
push ecx
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x84]
call fcn.00491924
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea edx, [esp + 0x9c]
push edx
call sub.kernel32.dll_CreateFileA
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x48c8d8
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff37
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x30]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48c923
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x38]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48c96e
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle
push 0x4d0b3d
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x48cbe1
mov eax, dword [esp + 0x54]
push eax
call sub.kernel32.dll_lstrlenA_1
dec eax
push eax
mov edx, dword [esp + 0x58]
push edx
lea ecx, [esp + 0x8c]
push ecx
call sub.kernel32.dll_lstrcpynA_1
push 0x4d0b40
lea eax, [esp + 0x88]
push eax
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x84]
call fcn.00491924
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea edx, [esp + 0x9c]
push edx
call sub.kernel32.dll_CreateFileA
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x48ca10
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff37
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x30]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48ca5b
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x38]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48caa6
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_CreateFileA
mov dword [esp + 0x60], eax
cmp dword [esp + 0x60], 0xffffffff
jne 0x48caf2
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff37
jmp 0x48ce68
push 0
push 0
push 0x10
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_SetFilePointer
mov dword [esp + 0x6c], 1
push 0
lea ecx, [esp + 0x6c]
push ecx
push 1
lea eax, [esp + 0x7c]
push eax
mov edx, dword [esp + 0x70]
push edx
call sub.kernel32.dll_ReadFile
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48cb5f
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x60]
push eax
call sub.kernel32.dll_CloseHandle
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff35
jmp 0x48ce68
cmp dword [esp + 0x68], 0
je 0x48cbcd
push 0
lea edx, [esp + 0x6c]
push edx
push 1
lea ecx, [esp + 0x7c]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48cbbb
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x60]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
inc dword [esp + 0x6c]
cmp dword [esp + 0x6c], 0x100
jle 0x48cb0a
mov edx, dword [esp + 0x60]
push edx
call sub.kernel32.dll_CloseHandle
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
push 0x4d0b44
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_lstrcmpiA
test eax, eax
jne 0x48ce47
mov edx, dword [esp + 0x54]
push edx
call sub.kernel32.dll_lstrlenA_1
dec eax
push eax
mov ecx, dword [esp + 0x58]
push ecx
lea eax, [esp + 0x8c]
push eax
call sub.kernel32.dll_lstrcpynA_1
push 0x4d0b47
lea edx, [esp + 0x88]
push edx
call sub.kernel32.dll_lstrcatA
lea eax, [esp + 0x84]
call fcn.00491924
push 0
push 0
push 2
push 0
push 3
push 0x40000000
lea edx, [esp + 0x9c]
push edx
call sub.kernel32.dll_CreateFileA
mov dword [esp + 0x5c], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x48cc79
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff37
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x30]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48ccc4
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
push 0
lea edx, [esp + 0x6c]
push edx
push 8
lea ecx, [esp + 0x38]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48cd0f
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x44]
push eax
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
push 0
push 0
push 3
push 0
push 3
push 0x80000000
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_CreateFileA
mov dword [esp + 0x60], eax
cmp dword [esp + 0x5c], 0xffffffff
jne 0x48cd5b
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff37
jmp 0x48ce68
push 0
push 0
push 0x10
mov edx, dword [esp + 0x6c]
push edx
call sub.kernel32.dll_SetFilePointer
mov dword [esp + 0x6c], 1
push 0
lea ecx, [esp + 0x6c]
push ecx
push 1
lea eax, [esp + 0x7c]
push eax
mov edx, dword [esp + 0x70]
push edx
call sub.kernel32.dll_ReadFile
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48cdc8
mov ecx, dword [esp + 0x48]
push ecx
call sub.kernel32.dll_GlobalFree
mov eax, dword [esp + 0x60]
push eax
call sub.kernel32.dll_CloseHandle
mov edx, dword [esp + 0x5c]
push edx
call sub.kernel32.dll_CloseHandle
mov ecx, dword [esp + 0x44]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff35
jmp 0x48ce68
cmp dword [esp + 0x68], 0
je 0x48ce33
push 0
lea edx, [esp + 0x6c]
push edx
push 1
lea ecx, [esp + 0x7c]
push ecx
mov eax, dword [esp + 0x6c]
push eax
call sub.kernel32.dll_WriteFile_1
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
jne 0x48ce21
mov edx, dword [esp + 0x48]
push edx
call sub.kernel32.dll_GlobalFree
mov ecx, dword [esp + 0x60]
push ecx
call sub.kernel32.dll_CloseHandle
mov eax, dword [esp + 0x5c]
push eax
call sub.kernel32.dll_CloseHandle
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle
mov eax, 0xffffff33
jmp 0x48ce68
inc dword [esp + 0x6c]
cmp dword [esp + 0x6c], 0x100
jle 0x48cd73
mov edx, dword [esp + 0x60]
push edx
call sub.kernel32.dll_CloseHandle
mov ecx, dword [esp + 0x5c]
push ecx
call sub.kernel32.dll_CloseHandle
cmp dword [esp + 0x3c], 0xffffffff
jne 0x48c553
mov eax, dword [esp + 0x48]
push eax
call sub.kernel32.dll_GlobalFree
mov edx, dword [esp + 0x44]
push edx
call sub.kernel32.dll_CloseHandle
xor eax, eax
add esp, 0x3b4
pop edi
pop esi
ret