Function at 0x511b40
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x3c
mov ecx, dword [esp + 0x48]
push ebx
push ebp
mov ebp, dword [esp + 0x48]
mov ebx, dword [ecx + 0x54]
push esi
mov eax, dword [ebp + 0x18]
xor esi, esi
mov edx, dword [ebx + 0x3ba0]
mov dword [esp + 0x18], eax
mov eax, dword [0x73793c]
push edi
test eax, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x14], edx
je 0x511cfb
mov eax, dword [ebp + 0x28]
push eax
call fcn.004f3cc0
add esp, 4
mov dword [ebp + 0x2c], eax
test eax, eax
je 0x511f9e
mov eax, dword [0x737938]
test eax, eax
je 0x511cfb
lea ecx, [esp + 0x24]
lea edx, [esp + 0x28]
push ecx
lea eax, [esp + 0x30]
push edx
lea ecx, [esp + 0x38]
push eax
lea edx, [esp + 0x40]
push ecx
lea eax, [esp + 0x48]
push edx
lea ecx, [esp + 0x50]
push eax
lea edx, [esp + 0x58]
push ecx
lea eax, [esp + 0x60]
xor ebp, ebp
push edx
push eax
push ebp
call fcn.00469440
mov ecx, dword [0x72c0b8]
shl ecx, 0xb
push ecx
call fcn.004f56e0
mov esi, dword [esp + 0x3c]
mov ebx, dword [0x737938]
mov dword [esp + 0x44], eax
add esp, 0x2c
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 0x3858]
test eax, eax
mov dword [esp + 0x48], edx
mov dword [esi + 0x3858], ebp
jne 0x511c1d
mov ax, word [esi + 0x3ad0]
push eax
call fcn.004f3a10
add esp, 4
mov dword [esi + 0x14], eax
test ebx, ebx
jbe 0x511ccc
mov ecx, dword [0x72c0b8]
mov edi, dword [esp + 0x18]
shl ecx, 0xb
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov esi, dword [0x72c0b8]
cmp ebx, esi
ja 0x511c4e
mov esi, ebx
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
xor edi, edi
push esi
push eax
push edi
push ebp
push ecx
call fcn.0041c210
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
add esp, 0x14
push edx
mov edx, dword [esp + 0x34]
push eax
mov eax, dword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x44]
push edx
mov edx, dword [esp + 0x4c]
push eax
mov eax, dword [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x5c]
push edx
mov edx, esi
push eax
push ecx
shl edx, 0xb
push edx
push edi
push 0x800
push edi
push ebp
call fcn.0053f700
mov ecx, dword [esp + 0x78]
push edx
push eax
mov eax, dword [esp + 0x48]
mov edx, dword [ecx + 0x2c]
push eax
push edx
call fcn.004f5ad0
sub ebx, esi
add esp, 0x38
add ebp, esi
test ebx, ebx
ja 0x511c25
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0x14]
push eax
call fcn.004f3b80
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x4c]
push edx
mov dword [esi + 0x14], 0
mov dword [esi + 0x3858], ecx
call fcn.004f5720
mov ebp, dword [esp + 0x58]
mov ebx, dword [esp + 0x18]
add esp, 8
mov eax, dword [0x72c0b8]
shl eax, 0xb
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
mov dword [esp + 0x50], edi
jne 0x511d33
push 0x6722c4
push 0x64
call fcn.0051faa0
push eax
push 1
push ebp
call fcn.0051a630
add esp, 0x14
jmp 0x511f8b
mov ecx, dword [0x72c0b8]
xor eax, eax
shl ecx, 0xb
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [0x78ca5c]
mov esi, dword [0x737938]
test eax, eax
je 0x511d68
push str.Writing_media...
call fcn.004a8900
add esp, 4
cmp esi, dword [esp + 0x14]
jae 0x511eb4
push 1
call fcn.0050ebc0
mov eax, dword [esp + 0x18]
mov ecx, dword [0x72c0b8]
sub eax, esi
add esp, 4
cmp eax, ecx
mov ebx, ecx
jae 0x511da7
mov edi, dword [esp + 0x50]
mov ebx, eax
shl ecx, 0xb
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x50]
mov ecx, dword [esp + 0x58]
push 0
push ebx
push eax
push ecx
call fcn.00508780
mov edi, eax
add esp, 0x10
test edi, edi
je 0x511f8b
mov eax, dword [0x73793c]
test eax, eax
je 0x511dfa
push 0
push 0
push 0
push 0
mov eax, dword [ebp + 0x2c]
push 0
push 0
mov edx, ebx
push 0
push 0
shl edx, 0xb
push 0
push edx
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
push eax
call fcn.004f5ad0
add esp, 0x38
jmp 0x511e21
mov ecx, dword [0x72c0b8]
mov edx, dword [esp + 0x1c]
shl ecx, 0xb
push 0x800
push ecx
push edi
push esi
push edx
push ebp
call fcn.0050c0f0
add esp, 0x18
test eax, eax
je 0x511eff
mov eax, dword [0x737940]
test eax, eax
je 0x511e50
mov eax, dword [0x737938]
test eax, eax
je 0x511e50
mov eax, dword [0x72c0b8]
mov ecx, dword [esp + 0x10]
push eax
push esi
push edi
push ecx
call fcn.00429000
add esp, 0x10
test eax, eax
je 0x511f8b
mov edx, dword [0x72c0b8]
mov eax, dword [esp + 0x58]
add esi, edx
mov edx, dword [esp + 0x50]
push 1
push ebx
push edx
push eax
call fcn.00508780
mov eax, dword [0x78ca5c]
mov ecx, dword [esp + 0x24]
add esp, 0x10
test eax, eax
mov eax, dword [0x737938]
je 0x511e95
sub ecx, eax
mov edx, esi
push 0
push ecx
sub edx, eax
push 0
push edx
call fcn.004a8920
add esp, 0x10
jmp 0x511ea6
mov edx, esi
sub ecx, eax
sub edx, eax
push ecx
push edx
push ebp
call fcn.0051ae90
add esp, 0xc
cmp esi, dword [esp + 0x14]
jb 0x511d72
mov ebx, dword [esp + 0x10]
push 0x64
push 0x64
push ebp
call fcn.0051ae90
mov eax, dword [0x737940]
add esp, 0xc
test eax, eax
je 0x511f51
mov eax, dword [0x737938]
test eax, eax
je 0x511f51
mov eax, dword [0x73793c]
test eax, eax
je 0x511f38
mov ecx, dword [0x72c0b8]
mov edx, dword [ebp + 0x2c]
push ecx
push edx
push ebx
push ebp
call fcn.00429080
add esp, 0x10
test eax, eax
je 0x511f8b
jmp 0x511f51
mov eax, dword [esp + 0x1c]
push eax
call fcn.00509220
add esp, 4
push eax
push esi
push 0x231
push str.Error_writing_data.
push 0x14a
call fcn.0051faa0
add esp, 8
push eax
push str._s___d__08x__08x_
push 1
push ebp
call fcn.0051a630
add esp, 0x1c
jmp 0x511f8b
mov eax, dword [0x72c0b8]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
push ebx
push ebp
call fcn.00429080
add esp, 0x10
test eax, eax
je 0x511f8b
mov eax, dword [0x78ca5c]
test eax, eax
je 0x511f6e
call fcn.004a89a0
push 0x674034
call fcn.004a87c0
add esp, 4
jmp 0x511f83
call fcn.0051abc0
cmp eax, 1
jne 0x511f83
push 0
push ebp
call fcn.0051ad90
add esp, 8
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x50]
test eax, eax
je 0x511f9a
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [esp + 0x20]
mov eax, dword [0x73793c]
test eax, eax
je 0x511fd9
mov eax, dword [ebp + 0x2c]
test eax, eax
je 0x511fd9
test esi, esi
je 0x511fc6
mov edx, dword [esp + 0x58]
mov ecx, dword [ebp + 0x28]
mov eax, dword [edx + 0x54]
push eax
push ecx
call fcn.00444630
add esp, 8
mov edx, dword [ebp + 0x2c]
push edx
call fcn.004f5730
add esp, 4
mov dword [ebp + 0x2c], 0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret