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

Disassembly:
push 0xffffffffffffffff
push 0x85f5f8
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x8ce6f4]
xor eax, esp
push eax
lea eax, [esp + 0x30]
mov dword fs:[0], eax
mov esi, ecx
mov edi, dword [esp + 0x40]
movzx eax, di
mov dword [esp + 0x1c], eax
call fcn.007d4063
test al, 8
je 0x4ad88c
push edi
call fcn.0080357a
movzx ecx, ax
mov dword [esp + 0x20], ecx
jmp 0x4ad89d
test al, 0x10
je 0x4ad8a0
push edi
call fcn.008034c1
movzx edx, ax
mov dword [esp + 0x20], edx
add esp, 4
mov edx, dword [esi + 0x20]
mov edi, dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0xb0
push edx
call edi
mov eax, dword [esp + 0x14]
push 1
push eax
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x2c]
push edx
mov ecx, esi
call fcn.004abf00
mov eax, dword [esp + 0x14]
mov ebp, dword [esp + 0x20]
mov ecx, dword [esp + 0x40]
test eax, eax
jns 0x4ad8ef
mov edx, dword [esi + 0x74]
cmp ecx, dword [edx - 0xc]
jg SetEndOfFile
cmp eax, ebp
jl SetEndOfFile
mov ebx, dword [esp + 0x18]
cmp eax, ebx
jg VirtualAlloc
cmp ecx, ebp
jl 0x4add45
cmp ecx, ebx
jg VirtualFree
cmp eax, ecx
jne 0x4adada
mov edx, dword [esi + 0x78]
cmp dword [edx - 0xc], 0
je 0x4ada91
cmp ecx, ebx
jne 0x4ad98e
mov eax, dword [esi + 0x74]
mov edx, dword [eax - 0xc]
dec edx
cmp ecx, edx
jl 0x4ad944
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
jmp 0x4add69
push 1
inc ecx
push ecx
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.004abf00
mov ebp, dword [esp + 0x20]
cmp ebp, 0xffffffff
je 0x4ad937
cmp ebp, dword [esp + 0x40]
jle 0x4ad937
mov edx, dword [esi + 0x20]
push ebp
push ebp
push 0xb1
push edx
call edi
mov eax, dword [esi + 0x20]
push 0
push 0
push 0xb7
push eax
call edi
mov eax, ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x40], ebp
mov ebx, dword [esp + 0x1c]
push eax
push ebx
mov ecx, esi
call fcn.004abe20
test eax, eax
je 0x4ad937
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x20]
inc ecx
push ecx
push edx
push 0xb1
push eax
call edi
mov ecx, dword [esi + 0x20]
push 0
push 0
push CreateMutexA
push ecx
call edi
push 1
push ebx
lea ecx, [esp + 0x2c]
call fcn.004ac2a0
mov edx, dword [eax]
push 1
push edx
mov ecx, esi
call fcn.004abaf0
lea ecx, [esp + 0x24]
call fcn.004a8c20
mov ecx, dword [esp + 0x40]
mov eax, ebx
push eax
push ecx
lea ecx, [esi + 0x74]
call fcn.004abc60
mov eax, dword [esp + 0x40]
mov edx, dword [esi + 0x20]
inc eax
push eax
push eax
push 0xb1
push edx
call edi
mov eax, dword [esi + 0x20]
push 0
push 0
push 0xb7
push eax
call edi
mov eax, dword [esi + 0x20]
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x18]
push edx
push 0xb0
push eax
call edi
mov eax, dword [esp + 0x40]
cmp eax, dword [esp + 0x18]
jne 0x4add69
mov ecx, dword [esi + 0x74]
mov edx, dword [ecx - 0xc]
dec edx
cmp eax, edx
jge 0x4ada61
push 1
inc eax
push eax
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.004abf00
mov eax, dword [esp + 0x40]
mov ebp, dword [esp + 0x20]
cmp ebp, 0xffffffff
je InterlockedDecrement
cmp ebp, eax
jle 0x4add69
mov edx, dword [esi + 0x20]
push ebp
push ebp
push 0xb1
push edx
call edi
mov eax, dword [esi + 0x20]
push 0
push 0
push CreateEventW
push eax
jmp 0x4add67
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, esi
call fcn.004abe20
test eax, eax
je ResumeThread
mov ecx, dword [esi + 0x20]
lea edx, [esp + 0x24]
push edx
lea eax, [esp + 0x24]
push eax
push 0xb0
push ecx
call edi
mov ecx, esi
call fcn.007cc258
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push edx
push eax
push 1
mov ecx, esi
call fcn.004ad090
jmp CreateSemaphoreW
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, esi
call fcn.004abe20
test eax, eax
je SetThreadPriority
mov edx, dword [esi + 0x7c]
cmp dword [edx - 0xc], 0
je FlushFileBuffers
mov ebp, dword [esp + 0x14]
lea ecx, [esi + 0x78]
push ebp
mov ebx, 1
call fcn.004a9dc0
movzx eax, ax
lea ecx, [ebp + ebp + 2]
mov dword [esp + 0x24], eax
lea eax, [ebp + 1]
mov dword [esp + 0x20], ecx
cmp eax, dword [esp + 0x18]
jge 0x4adb52
test eax, eax
js CreateEventA
mov ecx, dword [esi + 0x78]
cmp eax, dword [ecx - 0xc]
jg GlobalGetAtomNameW
mov edx, dword [esp + 0x20]
movzx ecx, word [edx + ecx]
cmp cx, word [esp + 0x24]
jne 0x4adb52
add dword [esp + 0x20], 2
inc ebx
inc eax
jmp 0x4adb20
mov eax, dword [esp + 0x40]
sub eax, dword [esp + 0x14]
mov dword [esp + 0x20], ebx
cmp eax, ebx
jle IsBadWritePtr
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
add ebx, ebp
jmp IsBadReadPtr
push ebx
push ebp
lea eax, [esp + 0x20]
lea ecx, [esi + 0x74]
push eax
call fcn.004a9e10
mov dword [esp + IsDBCSLeadByteExx38], 0
test ebx, ebx
jle 0x4adc4e
mov ebx, dword [esp + 0x40]
sub ebx, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
sub ecx, ebx
inc ecx
push ecx
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x20]
call fcn.004ac4f0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3c], 1
call fcn.004aa540
lea ecx, [esp + 0x24]
mov byte [esp + 0x38], 0
call fcn.004a8c20
movzx eax, word [esi + 0x80]
dec ebx
push ebx
push eax
lea ecx, [esp + 0x2c]
call fcn.004ac2a0
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x40], 2
call fcn.004a9f20
lea ecx, [esp + 0x24]
mov byte [esp + 0x38], 0
call fcn.004a8c20
mov ebx, dword [esp + 0x18]
mov eax, dword [ebx - 0xc]
mov dword [esp + 0x24], eax
test eax, eax
jg 0x4adc1a
push CreateEventA
call fcn.004a8210
cmp dword [ebx - 4], 1
jle 0x4adc32
push eax
lea ecx, [esp + 0x1c]
call fcn.004a8590
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x24]
mov dx, word [esp + 0x1c]
mov word [ebx], dx
test eax, eax
js GlobalSize
cmp eax, dword [ebx - 8]
jg 0x4adc10
xor ecx, ecx
mov dword [ebx - 0xc], eax
mov word [ebx + eax*2], cx
jmp 0x4adc52
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x20]
add eax, ebp
push eax
mov eax, dword [esi + 0x20]
push ebp
push 0xb1
push eax
call edi
mov ecx, dword [esi + 0x20]
push 0
push 0
push 0xb7
push ecx
call edi
push 1
push ebx
mov ecx, esi
call fcn.004abaf0
mov edx, dword [esi + 0x20]
push ebp
push ebp
push 0xb1
push edx
call edi
mov eax, dword [esi + 0x20]
push 0
push 0
push CompareStringW
push eax
call edi
mov eax, dword [ebx - 0xc]
xor ecx, ecx
mov dword [esp + 0x20], ecx
test eax, eax
jle reloc.KERNEL32.dll_GetThreadLocale
jmp 0x4adcb4
mov ecx, dword [esp + 0x20]
test ecx, ecx
js GlobalFlags
cmp ecx, eax
jg CreateEventA
movzx edx, word [ebx + ecx*2]
add ecx, ebp
push edx
push ecx
lea ecx, [esi + 0x74]
call fcn.004abc60
mov ecx, dword [esp + 0x20]
mov eax, dword [ebx - 0xc]
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, eax
jl 0x4adcb0
mov eax, dword [esp + 0x14]
inc eax
push eax
push eax
mov eax, dword [esi + 0x20]
push 0xb1
push eax
call edi
mov ecx, dword [esi + 0x20]
push 0
push 0
push 0xb7
push ecx
call edi
lea ecx, [esp + 0x18]
call fcn.004a8c20
jmp 0x4add69
mov ecx, dword [esi + 0x20]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x30]
push eax
push 0xb0
push ecx
call edi
mov ecx, esi
call fcn.007cc258
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
push edx
push eax
push 1
mov ecx, esi
call fcn.004ad090
jmp 0x4add69
mov ebx, dword [esp + 0x18]
push 0xffffffffffffffff
call dword [sym.imp.USER32.dll_MessageBeep]
mov ecx, dword [esi + 0x20]
push ebx
push ebp
push GetFileSize
push ecx
call edi
mov edx, dword [esi + 0x20]
push 0
push 0
push 0xb7
push edx
call edi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0xc